Learn R Programming

maxLik (version 0.6-0)

stdEr: Standard deviations

Description

Extract standard deviations from estimated models.

Usage

stdEr(x, ...)
## S3 method for class 'default':
stdEr(x, \dots)
## S3 method for class 'lm':
stdEr(x, \dots)

Arguments

x
a statistical model, such as created by lm
...
further arguments for methods

Value

  • numeric, the estimated standard errors of the coefficients.

Details

stdEr is a generic function with methods for objects of "lm" class. The default method returns the square root of the diagonal of the variance-covariance matrix.

See Also

vcov, maxLik.

Examples

Run this code
## ML estimation of exponential duration model:
t <- rexp(100, 2)
loglik <- function(theta) log(theta) - theta*t
## Estimate with numeric gradient and hessian
a <- maxLik(loglik, start=1, print.level=2)
stdEr(a)

Run the code above in your browser using DataLab