Learn R Programming

cusp (version 2.3.8)

vcov.cusp: Calculate Variance-Covariance Matrix for a Fitted Cusp Model Object

Description

Returns an estimate of the variance-covariance matrix of the main parameters of a fitted cusp model object.

Usage

# S3 method for cusp
vcov(object, ...)
# S3 method for cusp
confint(object, parm, level = 0.95, ...)

Value

The variance-covariance matrix (vcov).

A matrix (or vector) with columns giving lower and upper confidence limits for each parameter. These will be labeled as (1-level)/2 and 1 - (1-level)/2 in

Arguments

object

a fitted cusp model object.

parm

a specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered.

level

the confidence level required.

...

additional arguments for method functions.

Author

Raoul Grasman

Details

The variance-covariance matrix is estimated by the inverse of the Hessian matrix of the log-likelihood at the maximum likelihood estimate (vcov).

Normal theory confidence intervals are computed for all parameters in the cusp model object using vcov to obtain the standard errors (confint).

References

Seber, Wild (2005) Nonlinear regression. New York: Wiley

See Also

vcov, cusp

Examples

Run this code
set.seed(123)
x1 = runif(150)
x2 = runif(150)
z = Vectorize(rcusp)(1, 4*x1-2, 4*x2-1)
data <- data.frame(x1, x2, z)
fit <- cusp(y ~ z, alpha ~ x1+x2, beta ~ x1+x2, data)

vcov(fit)

Run the code above in your browser using DataLab