vcovvlm {VGAM} | R Documentation

## Calculate Variance-Covariance Matrix for a Fitted VLM or RR-VGLM Object

### Description

Returns the variance-covariance matrix of the parameters of a fitted `vlm-class` object or a fitted `rrvglm-class` object.

### Usage

    vcov(object, ...)
    vcovvlm(object, dispersion = NULL, untransform = FALSE)

### Arguments

`object` | A fitted model object, having class `vlm-class` or `rrvglm-class` or a superclass of such. The former includes a `vglm` object.
`dispersion` | Numerical. A value may be specified, else it is estimated for quasi-GLMs (e.g., method of moments). For almost all other types of VGLMs it is usually unity. The value is multiplied by the raw variance-covariance matrix.
`untransform` | logical. For intercept-only models with trivial constraints; if set `TRUE` then the parameter link function is inverted to give the answer for the untransformed/raw parameter.
`...` | Same as `vcov`.

### Details

This methods function is based on the QR decomposition of the (large) VLM model matrix and working weight matrices. Currently `vcovvlm` operates on the fundamental `vlm-class` objects because pretty well all modelling functions in VGAM inherit from this. Currently `vcovrrvglm` is not entirely reliable because the elements of the A–C part of the matrix sometimes cannot be computed very accurately, so that the entire matrix is not positive-definite.

### Value

Same as `vcov`.

### Note

For some models inflated standard errors can occur, such as parameter estimates near the boundary of the parameter space. Detection for this is available for some models using `hdeff.vglm`, which tests for an Hauck-Donner effect (HDE) for each regression coefficient. If the HDE is present, using `lrp.vglm` should return more accurate p-values.

### Author(s)

Thomas W. Yee

### See Also

`confintvglm`, `summaryvglm`, `vcov`, `hdeff.vglm`, `lrp.vglm`.

### Examples

    ndata <- data.frame(x2 = runif(nn <- 300))
    ndata <- transform(ndata, y1 = rnbinom(nn, mu = exp(3+x2), size = exp(1)),
                              y2 = rnbinom(nn, mu = exp(2-x2), size = exp(0)))
    fit1 <- vglm(cbind(y1, y2) ~ x2, negbinomial, data = ndata, trace = TRUE)
    fit2 <- rrvglm(y1 ~ x2, negbinomial(zero = NULL), data = ndata)
    coef(fit1, matrix = TRUE)
    vcov(fit1)
    vcov(fit2)

[Package VGAM version 1.0-4 Index]