Description Usage Arguments Value References See Also Examples
The function calculates the mean squared error (MSE) for the set of covariables used in the GREG.
1 |
x |
|
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 |
... |
Additional arguments for the |
Retorna un data.frame
El R^2 for the model defined
The mean squared error obtained in the estimation
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.
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.