Description Usage Arguments Value References See Also Examples
The function makes the estimation of variances for the Horvitz-Thompson estimator (TH) and the generalized regression estimator (GREG) when plausible values are employed. The estimation of the variance for a domain is given by the equation
EE(\hat{η}) = √{\frac{1}{5}∑_{i=1}^{5}Var_m(\hat{η}_i)+ ≤ft(1 + \frac{1}{5}\right)\frac{1}{4}∑_{i=1}^{5}(\hat{η}_i - \hat{η})^2}
where Var_m(\hat{η}_i) is the variance of the estimator calculated from the observations and the sampling design. The second term of the equation is estimated by using the jackknife method. In the case of the generalized regression estimator, it is necessary to adjust a lineal model, where the plausible value \hat{η}_{ij} included as the response variable, as follows:
\hat{η}_{ij}=β X_i+e_{ij}
The GREG variance is estimated for each doman with X_i as auxiliary information, employing the model’s estimated residuals using the expression
\widehat{Var}(\hat{η}_{GREG})=∑∑_s\frac{Δ_{jl}}{π_{jl}}g_{js} \frac{\hat{e}_{js}}{π_j}g_{ls}\frac{\hat{e}_{ls}}{π_l}
donde
g_{js} = 1+≤ft( \bar{X}-\hat{\bar{X}}\right)^t ≤ft(∑_m \frac{w_j}{σ^2_l}x_jx_j^t\right)^{-1}x_j
\hat{e}_{ij} = \hat{η}_{ij} - \hat{β} X_i
w_j = \frac{1}{π_j}
1 | jackknifeVar(x, yhat, weight, total, Xk, stratum = NULL, ...)
|
x |
|
yhat |
Name of the column which contains the estimated values of the variable |
weight |
Expansion factor of each observation |
total |
Total for the auxiliary variable |
Xk |
Vector which contains the names of the covariantes. |
stratum |
Indicator of the domains in the sample, by default |
... |
Additional arguments employed by the calib function. |
Returns a data.frame
with the results obtained for the Horvitz-Thompson
estimator and the GREG as well as their corresponding variances for the indicated groups and subgroups
Shao, J., & Tu, D. (2012). The jackknife and bootstrap. Springer Science & Business Media.
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 17 18 19 20 | data('ResultStudent')
attach(ResultStudent)
sampling <- ResultStudent[["student"]]
#Add dummys
sampling <- data.frame(sampling[,c("schooltype",'weight','prop','ses')],
Domains(sampling[["urbanicity"]]),
Domains(sampling[["schooltype"]]))
# Covariantes
Xk <- c('Rural', 'Urbana','No.Oficial', 'Oficial', 'ses')
jackknifeVar(x=sampling,yhat = "prop",weight = 'weight',
Xk=c("ses", "Rural","Urbana"),
total = total, method='linear')
jackknifeVar(sampling,weight = 'weight',yhat = "prop",
Xk = 'ses',total = total, method='linear')
jackknifeVar(sampling,yhat = "prop",weight = 'weight',
Xk = 'ses',total = total, method='linear',
stratum = 'schooltype')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.