Calculate variance-covariance matrix for a fitted model object
Source:R/vcov.R
, R/vcov_glm.R
vcov.spmodel.Rd
Calculate variance-covariance matrix for a fitted model object.
Arguments
- object
A fitted model object from
splm()
,spautor()
,spglm()
, orspgautor()
.- ...
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()
orspgautor()
. The default isTRUE
.
Value
The variance-covariance matrix of coefficients obtained via coef()
.
Currently, only the variance-covariance matrix of the fixed effects is supported.
Examples
spmod <- splm(z ~ water + tarp,
data = caribou,
spcov_type = "exponential", xcoord = x, ycoord = y
)
vcov(spmod)
#> (Intercept) waterY tarpnone tarpshade
#> (Intercept) 0.096679779 -2.079467e-03 -2.849136e-03 -2.725104e-03
#> waterY -0.002079467 4.158934e-03 5.070812e-18 -5.722299e-20
#> tarpnone -0.002849136 5.070812e-18 6.019454e-03 3.242625e-03
#> tarpshade -0.002725104 -5.722299e-20 3.242625e-03 5.878022e-03