Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vcov.segmented

Variance-Covariance Matrix for a Fitted Segmented Model


Description

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

Usage

## S3 method for class 'segmented'
vcov(object, var.diff = FALSE, is = FALSE, ...)

Arguments

object

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

var.diff

logical. If var.diff=TRUE and there is a single segmented variable, the covariance matrix is computed using a sandwich-type formula. See Details in summary.segmented.

is

logical. If TRUE, the asymptotic covariance matrix based on the idea of induced smoothing is returned. If is=TRUE, var.diff=FALSE is set. is=TRUE only works with segmented (g)lm fits.

...

additional arguments.

Details

The returned covariance matrix is based on an approximation of the nonlinear segmented term. Therefore covariances corresponding to breakpoints are reliable only in large samples and/or clear cut segmented relationships. If is=TRUE, the returned covariance matrix depends on the design matrix having the term I(x>psi) replaced by its smooth counterpart.

Value

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

Note

var.diff=TRUE works when there is a single segmented variable.

Author(s)

Vito M. R. Muggeo, vito.muggeo@unipa.it

See Also

Examples

##continues example from summary.segmented()
# vcov(oseg)
# vcov(oseg, var.diff=TRUE)
# vcov(oseg, is=TRUE)

segmented

Regression Models with Break-Points / Change-Points Estimation

v1.3-4
GPL
Authors
Vito M. R. Muggeo [aut, cre] (<https://orcid.org/0000-0002-3386-4054>)
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.