estimators {saeTrafo}R Documentation

Presents point, MSE and CV estimates

Description

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.

Usage

estimators(object, MSE, CV, ...)

## S3 method for class 'saeTrafo'
estimators(object, MSE = FALSE, CV = FALSE, ...)

Arguments

object

an object of type "saeTrafo", representing point and, if chosen, MSE estimates.

MSE

optional logical. If TRUE, MSE estimates are added to the data frame of point estimates. Defaults to FALSE.

CV

optional logical. If TRUE, coefficients of variation are added to the data frame of point estimates. Defaults to FALSE.

...

other parameters that can be passed to function estimators.

Details

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).

Value

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.

See Also

saeTrafoObject, NER_Trafo

Examples



# 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)



[Package saeTrafo version 1.0.4 Index]