var.strata | R Documentation |
var.strata
calculates the anticipated means, variances and relative root mean squared error (RRMSE) obtained when applying a stratified design to a survey variable Y. The variable Y can be input or it can be defined from X by a specified loglinear with mortality, heteroscedastic linear or random replacement model.
print.var.strata
prints a "var.strata" object, presenting the stratification information into a table.
var.strata(strata, y = NULL, rh = strata$args$rh, rh.postcorr = FALSE, model = c("none", "loglinear", "linear", "random"), model.control = list()) ## S3 method for class 'var.strata' print(x, ...)
strata |
An object of class "strata", which represents a stratified design. |
y |
A vector containing the values of the survey variable Y for every unit of the population, respecting the order of the units in the |
rh |
A vector giving the anticipated response rates in each of the |
rh.postcorr |
A logical. If TRUE, a posterior correction for non-response is applied. This correction takes into account the non-response in the |
model |
A character string identifying the model used to describe the discrepancy between the stratification variable X and the survey variable Y. It can be |
model.control |
A list of model parameters (see |
x |
An object of class "var.strata" to print. |
... |
Additional arguments affecting the print produced. |
POSTERIOR CORRECTION FOR NON-RESPONSE (with a target CV only
The optional posterior correction for non-response is done as follows. For each take-some stratum, nh is increased if the input rh
is lower than the anticipated response rate in the strata.bh
object, and nh is decreased if the input rh
is higher than the anticipated response rate given when creating the strata.bh
object. The modification of nh is done by multiplying it by strata$args$rh/rh
.
The weakness of this posterior correction is that it cannot take into account non-response in a take-all stratum. In that stratum, nh cannot be increased since it is equal to Nh. To correctly account for non-response in a take-all stratum, the boundary of the stratum has to be lowered. This is what the generalized Lavallee-Hidiroglou method does (strata.LH
).
nh |
A vector of length |
n |
The total sample size ( |
nhnonint |
A vector of length L containing the non-integer values of the sample sizes. This vector can be different than |
certain.info |
A vector giving statistics for the certainty stratum (see |
meanh |
A vector of length L containing the anticipated means of Y in each stratum. |
varh |
A vector of length L containing the anticipated variances of Y in each stratum. |
mean |
A numeric: the anticipated global mean value of Y. |
RMSE |
A numeric: the root mean squared error (or standard error if |
RRMSE |
A numeric: the anticipated relative root mean squared error (or coefficient of variation if |
relativebias |
A numeric: the anticipated relative bias of the estimator, i.e. ( |
propbiasMSE |
A numeric: the proportion of the MSE attributable to the bias of the estimator, i.e. ( |
call |
The function call (object of class "call"). |
date |
A character string that contains the system date and time when the function ended. |
args |
A list of all the arguments input to the function or used by default. |
Sophie Baillargeon Sophie.Baillargeon@mat.ulaval.ca and
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca
Baillargeon, S. and Rivest L.-P. (2011). The construction of stratified designs in R with the package stratification. Survey Methodology, 37(1), 53-65.
strata.bh
, strata.cumrootf
, strata.geo
, strata.LH
nomodel <- strata.LH(x=Sweden$REV84, CV=0.05, Ls=3, alloc=c(0.5,0,0.5), takeall=1, model="none") # We can give a vector of the Y values for every unit in the population var.strata(nomodel, y=Sweden$RMT85) # Or specify a model between X and Y var.strata(nomodel, model="loglinear", model.control=list(beta=1.058355, sig2=0.06593083, ph=1)) # Compared to taking into account the model in the optimization model <- strata.LH(x=Sweden$REV84, CV=0.05, Ls=3, alloc=c(0.5,0,0.5), takeall=1, model="loglinear", model.control=list(beta=1.058355, sig2=0.06593083, ph=1)) var.strata(model, y=Sweden$RMT85) ### Examples of posterior correction for non-response LH <- strata.LH(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5), takeall=1) LH # Without non-response in the take-all strata var.strata(LH, rh.postcorr=TRUE, rh=c(0.85,0.9,0.9,1)) strata.LH(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5), takeall=1, rh=c(0.85,0.9,0.9,1)) # With non-response in the take-all strata var.strata(LH, rh.postcorr=TRUE, rh=0.9) strata.LH(x=MRTS, CV=0.01, Ls=4, alloc=c(0.5,0,0.5), takeall=1, rh=0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.