R/vcov.R, R/vcov_glm.R
vcov.spmodel.RdCalculate variance-covariance matrix for a fitted model object.
A fitted model object from splm(), spautor(), spglm(), or spgautor().
Other arguments. Not used (needed for generic consistency).
A logical indicating whether to return the corrected variance-covariance
matrix for models fit using spglm() or spgautor(). The default is
TRUE.
The variance-covariance matrix of coefficients obtained via coef().
Currently, only the variance-covariance matrix of the fixed effects is supported.
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
vcov(spmod)
#> (Intercept) waterY tarpnone tarpshade
#> (Intercept) 0.092251329 -2.075839e-03 -2.843467e-03 -2.717938e-03
#> waterY -0.002075839 4.151677e-03 4.773428e-19 1.065341e-17
#> tarpnone -0.002843467 4.773428e-19 6.005846e-03 3.234899e-03
#> tarpshade -0.002717938 1.065341e-17 3.234899e-03 5.862804e-03