Learn R Programming

greybox (version 0.6.4)

coef.greybox: Coefficients of the model and their statistics

Description

These are the basic methods for the alm and greybox models that extract coefficients, their covariance matrix, confidence intervals or generating the summary of the model. If the non-likelihood related loss was used in the process, then it is recommended to use bootstrap (which is slow, but more reliable).

Usage

# S3 method for greybox
coef(object, bootstrap = FALSE, ...)

# S3 method for alm confint(object, parm, level = 0.95, bootstrap = FALSE, ...)

# S3 method for alm vcov(object, bootstrap = FALSE, ...)

# S3 method for alm summary(object, level = 0.95, bootstrap = FALSE, ...)

Arguments

object

The model estimated using alm or other greybox function.

bootstrap

The logical, which determines, whether to use bootstrap in the process or not.

...

Parameters passed to coefbootstrap function.

parm

The parameters that need to be extracted.

level

The confidence level for the construction of the interval.

Value

Depending on the used method, different values are returned.

Details

The coef() method returns the vector of parameters of the model. If bootstrap=TRUE, then the coefficients are calculated as the mean values of the bootstrapped ones.

The vcov() method returns the covariance matrix of parameters. If bootstrap=TRUE, then the bootstrap is done using coefbootstrap function

The confint() constructs the confidence intervals for parameters. Once again, this can be done using bootstrap=TRUE.

Finally, the summary() returns the table with parameters, their standard errors, confidence intervals and general information about the model.

See Also

alm, coefbootstrap

Examples

Run this code
# NOT RUN {
# An example with ALM
ourModel <- alm(mpg~., mtcars, distribution="dlnorm")
coef(ourModel)
vcov(ourModel)
confint(ourModel)
summary(ourModel)

# }

Run the code above in your browser using DataLab