Learn R Programming

segmented (version 2.0-2)

vcov.stepmented: Variance-Covariance Matrix for a Fitted Segmented Model

Description

Returns the variance-covariance matrix of the parameters estimates (including breakpoints) of a fitted stepmented model object.

Usage

# S3 method for stepmented
vcov(object, k=NULL, return.X=FALSE, zero.cor=TRUE, ...)

Value

The full matrix of the estimated covariances between the parameter estimates, including the breakpoints.

Arguments

object

a fitted model object of class "stepmented", returned by any stepmented method

k

The power of n for the smooth approximation. Simulation evidence suggests k in [-1, -1/2]; with k=-1/2 providing somewhat 'conservative' standard errors especially at small sample sizes.

return.X

If TRUE the (pseudo) design matrix is returned (into a list).

zero.cor

If TRUE the covariances between the jumpoints and the remaining linear coefficients are set to zero.

...

additional arguments.

Author

Vito Muggeo

Details

The full covariance matrix is based on the smooth approximation $$I(x>\psi)\approx \Phi((x-\psi)/n^{k})$$ via the sandwich formula using the empirical information matrix and assuming \(x \in [0,1]\). \(\Phi(\cdot)\) is the standard Normal cdf, and \(k\) is the argument k. When k=NULL (default), it is computed via $$k=-(0.6 + 0.3 \ \log(snr) - (|\hat\psi-0.5|/n)^{1/2})$$ where \(snr\) is the signal-to-noise ratio corresponding to the estimated changepoint \(\hat\psi\) (in the range (0,1)). The above formula comes from extensive simulation studies under different scenarios.

See Also

stepmented

Examples

Run this code
##see ?stepmented

Run the code above in your browser using DataLab