strata.bh {stratification} | R Documentation |
Stratification of a Population Given a Set of Boundaries
Description
The function strata.bh
stratifies a population given a set of boundaries. It calculates the stratum sample sizes and the anticipated coefficient of variation or relative root mean squared error.
Usage
strata.bh(x, bh, n = NULL, CV = NULL, Ls = 3, certain = NULL,
alloc = list(q1 = 0.5, q2 = 0, q3 = 0.5), takenone = 0,
bias.penalty = 1, takeall = 0, takeall.adjust = TRUE,
rh = rep(1, Ls), model = c("none", "loglinear", "linear",
"random"), model.control = list())
Arguments
x |
A vector containing the values of the stratification variable |
bh |
A vector of the |
n |
A numeric: the target sample size. It has no default value. The argument |
CV |
A numeric: the target coefficient of variation or relative root mean squared error if |
Ls |
A numeric: the number of sampled strata (take-none and certain strata are not counted in |
certain |
A vector giving the position, in the vector |
alloc |
A list specifying the allocation scheme. The list must contain 3 numerics for the 3 exponents |
takenone |
A numeric: the number of take-none strata (0 or 1). The default is 0, i.e. no take-none stratum is included. |
bias.penalty |
A numeric between 0 and 1 giving the penalty for the bias in the anticipated mean squared error (MSE) of the survey estimator (see |
takeall |
A numeric: the number of take-all strata (one of {0, 1, ..., |
takeall.adjust |
A logical. If |
rh |
A vector giving the anticipated response rates in each of the |
model |
A character string identifying the model used to describe the discrepancy between the stratification variable |
model.control |
A list of model parameters (see |
Value
Nh |
A vector of length |
nh |
A vector of length |
n |
The total sample size ( |
nhnonint |
A vector of length |
certain.info |
A vector giving statistics for the certainty stratum (see |
opti.nh |
The final value of the criteria to optimize (either the total sample size |
opti.nhnonint |
The final value of the criteria to optimize (either the total sample size |
meanh |
A vector of length |
varh |
A vector of length |
mean |
A numeric: the anticipated global mean value of |
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. ( |
stratumID |
A factor, having the same length as the input |
takeall |
The number of take-all strata in the final solution. Note: It is possible that |
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 argument values input to the function or set by default. |
Author(s)
Sophie Baillargeon Sophie.Baillargeon@mat.ulaval.ca and
Louis-Paul Rivest Louis-Paul.Rivest@mat.ulaval.ca
References
Baillargeon, S. and Rivest L.-P. (2011). The construction of stratified designs in R with the package stratification. Survey Methodology, 37(1), 53-65.
See Also
print.strata
, plot.strata
, strata.cumrootf
, strata.geo
, strata.LH
Examples
adjust <- strata.geo(x=USbanks, CV=0.01, Ls=4, alloc=c(0.35,0.35,0))
adjust
adjust$nhnonint
noadjust <- strata.bh(x=USbanks, bh=adjust$bh, CV=0.01, Ls=4,
alloc=c(0.35,0.35,0), takeall=0, takeall.adjust=FALSE)
noadjust
noadjust$nhnonint
# without the adjustment for a take-all stratum, n is smaller than
# with the adjustment, but the target CV is not reached.