getVarCov {saeTrafo} | R Documentation |
Extract variance-covariance matrix from an saeTrafo object
Description
Method getVarCov.NER
extracts the variance-covariance matrix from a
fitted model of class "NER".
Usage
## S3 method for class 'NER'
getVarCov(obj, individuals = 1, type = "random.effects", ...)
Arguments
obj |
an object of type "NER". |
individuals |
vector of levels of the in-sample domains can be specified
for the types " |
type |
a character that determines the type of variance-covariance
matrix. Types that can be chosen
(i) random-effects variance-covariance matrix (" |
... |
additional arguments that are not used in this method. |
Details
The generic function getVarCov
is imported from package
nlme and re-exported to make the S3-methods available, even though the
nlme package itself is not loaded or attached. For default
documentation, see getVarCov
.
Value
A variance-covariance matrix or a list of variance-covariance
matrices, if more than one individual is selected. For method
getVarCov.NER
, the dimensions of the matrices are 1 x 1 for type
"random.effects
" and number of in-sample domains x number of
in-sample domains for types "conditional
" and "marginal
".
See Also
Examples
# Example to extract variance-covariance matrix
# Load Data
data("eusilcA_smp")
data("pop_area_size")
data("pop_mean")
data("pop_cov")
# Nested error regression model
NER_model <- NER_Trafo(fixed = eqIncome ~ gender + eqsize + cash +
self_empl + unempl_ben + age_ben + surv_ben +
sick_ben + dis_ben + rent + fam_allow + house_allow +
cap_inv + tax_adj,
smp_domains = "district",
pop_area_size = pop_area_size,
pop_mean = pop_mean, pop_cov = pop_cov,
smp_data = eusilcA_smp)
getVarCov(NER_model)