vcov.spmodel: Calculate variance-covariance matrix for a fitted model...

vcov.spmodelR Documentation

Calculate variance-covariance matrix for a fitted model object

Description

Calculate variance-covariance matrix for a fitted model object.

Usage

## S3 method for class 'splm'
vcov(object, type = "fixed", ...)

## S3 method for class 'spautor'
vcov(object, type = "fixed", ...)

## S3 method for class 'spglm'
vcov(object, var_correct = TRUE, ...)

## S3 method for class 'spgautor'
vcov(object, var_correct = TRUE, ...)

Arguments

object

A fitted model object from splm(), spautor(), spglm(), or spgautor().

type

For type = "fixed" (the default), the variance-covariance matrix of the fixed effects. If Satterthwaite degrees of freedom were calculated, type = "cov" returns the variance-covariance matrix of the covariance parameters, type = "spcov" returns the variance-covariance matrix of just the spatial variance-covariance parameters, and type = "randcov" returns the variance-covariance matrix of just the random effects (if relevant).

...

Other arguments. Not used (needed for generic consistency).

var_correct

A logical indicating whether to return the corrected variance-covariance matrix for models fit using spglm() or spgautor(). The default is TRUE.

Value

The variance-covariance matrix of fixed effect coefficients obtained via coef(..., type = "fixed") or the variance-covariance matrix of estimated covariance parameters (when available).

Examples

spmod <- splm(z ~ water + tarp,
  data = caribou,
  spcov_type = "exponential", xcoord = x, ycoord = y
)
vcov(spmod)

spmodel documentation built on Sept. 11, 2026, 1:07 a.m.