View source: R/estimators.saeTrafo.R
estimators | R Documentation |
Function estimators
is a generic function used to present point and
mean squared error (MSE) estimates. Furthermore, it calculates from both the
coefficients of variation (CV).
Method estimators.saeTrafo
presents point and MSE estimates.
Coefficients of variation are calculated using these estimators. The returned
object is suitable for printing with the method
print.estimators.saeTrafo
.
estimators(object, MSE, CV, ...)
## S3 method for class 'saeTrafo'
estimators(object, MSE = FALSE, CV = FALSE, ...)
object |
an object of type "saeTrafo", representing point and, if chosen, MSE estimates. |
MSE |
optional logical. If |
CV |
optional logical. If |
... |
other parameters that can be passed to function |
Objects of class "estimators.saeTrafo" have methods for following
generic functions: head
and tail
(for default documentation,
see head
, tail
),
as.matrix
(for default documentation, see matrix
),
as.data.frame
(for default documentation, see
as.data.frame
), subset
(for default documentation,
see subset
).
The return of estimators.saeTrafo
is an object of type
"estimators.saeTrafo" with point and/or MSE estimates and/or calculated CV's
from saeTrafoObject$ind
and, if chosen, saeTrafoObject$MSE
.
These objects contain two elements, one data frame
ind
and a character naming the indicator or indicator group
ind_name
.
saeTrafoObject
, NER_Trafo
# Example for presenting point, MSE, and CV estimates for a saeTrafo object
# 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, MSE = TRUE)
sae_mean <- estimators(NER_model, MSE = TRUE, CV = TRUE)
class(sae_mean)
# use generic functions for estimators.saeTrafo object
print(sae_mean)
head(sae_mean)
tail(sae_mean)
as.matrix(sae_mean)
as.data.frame(sae_mean)
subset(sae_mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.