Skip to contents

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 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.

Examples

## Create an `expmodel` object
emodel <- expmodel(mixexpgamma$n200)
## Estimate an model with parameters
emodel <- estimate(emodel, deglist=5, lmdlist=3.75)
#> (5,3.75)
#> Status: Normal Termination.
## 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)