func.expmodel {dsdp}R Documentation

Return the evaluation of a vector with Exponential-based model

Description

Evaluate an input vector x with Exponential-based model and return its vector. By default, it evaluate with the best model and its density, but it can designate the model by index and also can evaluate with a cumulative distribution.

Usage

## S3 method for class 'expmodel'
func(model, x, cdf = FALSE, n = 1, ...)

Arguments

model

expmodel object.

x

A numeric vector to be evaluated with a distribution.

cdf

A logical scalar whether the evaluation is done with a cumulative distribution or not. A default value is FALSE, which means that the evaluation is done with a density.

n

The index indicates the estimates. 1, by default, is the best estimate, and 2 is the 2nd best, etc.

...

Arguments to be passed to or from other methods.

Value

A numeric vector of the evaluatio of input vector x with a model.

See Also

expmodel() summary.expmodel() plot.expmodel() estimate.expmodel() pdf_expmodel() cdf_expmodel()

Examples

## Create an `expmodel` object
emodel <- expmodel(mixexpgamma$n200)
## Estimate an model with parameters
emodel <- estimate(emodel, deglist=5, lmdlist=3.75)
## A vector for input
x <- seq(0, 14, by=0.1)
## Density function
y <- func(emodel, x)
## Cumulative distribution
y <- func(emodel, x, cdf=TRUE)

[Package dsdp version 0.1.1 Index]