E.GREG: Generalized regression estimator (GREG)

Description Usage Arguments Value References See Also Examples

Description

The function calculates the mean squared error (MSE) for the set of covariables used in the GREG.

Usage

1
E.GREG(x, Xk, total, prom, weight, stratum = NULL, ...)

Arguments

x

data.frame which contains the information necessary to make the estimations.

Xk

Vector which contains the names of the auxiliary variables.

total

Total of the auxiliary variable.

prom

Name of the variable(s) to be estimated.

weight

Expansion factor of each observation.

stratum

Indicator of the domains in the sample. By default stratum = NULL.

...

Additional arguments for the calib function.

Value

Retorna un data.frame

R2

El R^2 for the model defined

mse

The mean squared error obtained in the estimation

References

-

Särdnal, C. E., Swensson, B., & Wretman, J. H. (1992). Model assisted survey sampling.

-

Rubin, D. B. (2004). Multiple imputation for nonresponse in surveys (Vol. 81). John Wiley & Sons.

-

Von Davier, M., Gonzalez, E., & Mislevy, R. (2009). What are plausible values and why are they useful. IERI monograph series, 2, 9-36.

See Also

S.fitFH, calib

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#Reading base
data('ResultStudent')
require(TeachingSampling)
#Selecting data
sampling <- ResultStudent[["student"]]
#Creating dummy variables
sampling <- data.frame(sampling[,c('weight','prop','ses')],
                      Domains(sampling[["urbanicity"]]),
                      Domains(sampling[["schooltype"]]))
#Total variable dummy
total <- ResultStudent[["total"]]

Xk <- c('Rural', 'Urbana','No.Oficial', 'Oficial', 'ses')

E.GREG(x = sampling,total = total, Xk = Xk,
              prom = 'prop',weight = 'weight',method='linear')

stalynGuerrero/multisae documentation built on May 30, 2019, 8:44 a.m.