R package stratification summary table

Sophie Baillargeon    Louis-Paul Rivest

A summary table of the package stratification can be found in the appendix of Baillargeon and Rivest (2011). Since the publication of this paper, the package has been updated (see the NEWS file for more details). At the end of this short note you will find an update of this summary table that reflects the changes made to the package. This table aims at providing a quick reference for the R package stratification. It lists the five public functions in stratification and their arguments. The following notes complete the table

(1) According to the general allocation scheme (Hidiroglou and Srinath, 1993). The stratum sample sizes are proportional to Nh2⁢q1⁢Y¯h2⁢q2⁢Sy⁢h2⁢q3 (see help(stratification) for more details).

(2) The elements of the model.control argument depend on the model :
- loglinear model with mortality :

Y={exp⁡(α+beta⁢log⁡(X)+epsilon)with probability ⁢ph0with probability ⁢1−ph

where epsilon∼N⁡(0,sig2) is independent of X. The parameter ph is specified through ph, ptakenone and pcertain.
- heteroscedastic linear model :

Y=beta⁢X+epsilonwhere⁢epsilon∼N⁡(0,sig2⁢Xgamma)

- random replacement model:

Y={Xwith probability ⁢1−epsilonX⁢n⁢e⁢wwith probability epsilon

where X⁢n⁢e⁢w is a random variable independent of X with the same distribution as X.

The following table presents model.control default values according to the model.

model beta sig2 ph ptakenone pcertain gamma epsilon
"loglinear" 1 0 rep(1,Ls) 1 1 – –
"linear" 1 0 – – – 0 –
"random" – – – – – – 0

(3) The default value of initbh is the boundaries obtained with the cumulative root frequency method of Dalenius and Hodges (1959) for Kozak’s algorithm, and the set of arithmetic starting points of Gunning and Horgan (2007) for Sethi’s algorithm. If takenone=1 and initbh is of size Ls-1, the initial boundary of the take-none stratum is set to the first percentile of X.

(4) The following table summarize information about elements of algo.control. For a complete description of every element see help(strata.LH). Sethi’s algorithm has only one customizable parameter, the maximal number of iterations maxiter. However, for Kozak’s algorithm, every parameter in the table below apply.

parameter description format default
maxiter maximal number of iterations positive integer 500 (Sethi) or
10 000 (Kozak)
minsol if the number of solutions is below integer ≥ 2 and 10 000
minsol ⇒ complete enumeration ≤ 2 000 000
idopti identification of stratum sample sizes "nh" or "nh"
used in optimization criteria calculation "nhnonint"
minNh minimum size for sampled strata integer ≥ 2 2
maxstep maximal step for boundary modification integer ≥ 2 ⋆Nu/10, rounded up
and truncated to 100
maxstill maximal number of iterations without positive integer maxstep*10, bounded
boundary modification between 50 and 500
rep number of repetition of the algorithm integer ≥ 1 5
trymany indicator for trying many initial TRUE or FALSE TRUE
stratum boundaries

⋆Nu = number of unique values of the stratification variable X (without considering the units in the certainty stratum)

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. http://www.statcan.gc.ca/pub/12-001-x/2011001/article/11447-eng.pdf

Dalenius, T. and Hodges, J.L., Jr. (1959). Minimum variance stratification, Journal of the American Statistical Association, 54, 88-101.

Gunning, P. and Horgan, J. M. (2007). Improving the Lavallée and Hidiroglou algorithm for stratification of skewed populations, Journal of Statistical Computation and Simulation, 77, 277-291

Hidiroglou, M. A. , and Srinath, K. P. (1993). Problems associated with designing subannual business surveys, Journal of Business and Economic Statistics, 11, 397-405

argument

strata.cumrootf

strata.geo

strata.LH

strata.bh

var.strata

description format default
x ✓ ✓ ✓ ✓ stratification variable numeric vector none (x is mandatory)
bh ✓ stratum boundaries numeric vector, length L−1 none (bh is mandatory)
n ✓ ✓ ✓ ✓ target total sample size positive integer none (n or CV is mandatory)
CV ✓ ✓ ✓ ✓ target CV or RRMSE numeric none (n or CV is mandatory)
Ls ✓ ✓ ✓ ✓ number of sampled strata integer ≥ 2 3
certain ✓ ✓ ✓ ✓ x-indices for units a priori numeric vector NULL (no certainty stratum)
chosen to be in the sample
alloc ✓ ✓ ✓ ✓ allocation specification (1) list (q1,q2,q3) where qi≥0 Neyman (q1=q3=0.5, q2=0)
takenone ✓ ✓ number of take-none strata 0 or 1 0
bias.penalty ✓ ✓ penalty for the bias numeric ∈[0,1] 1
takeall ✓ ✓ number of take-all strata one of {0,1,…,Ls−1} 0
takeall.adjust ✓ indicator of adjustment TRUE or FALSE TRUE (as in the rest
for take-all strata of the package)
rh ✓ ✓ ✓ ✓ ✓ anticipated response rates numeric (vector or not) rep(1,Ls) or rh from strata
rh.postcorr ✓ indicator of posterior TRUE or FALSE FALSE (no correction)
correction for non-response
model ✓ ✓ ✓ ✓ ✓ model identification "none", "loglinear", "none"
"linear"* or "random"* → (*unavailable with Sethi’s algo)
model.control ✓ ✓ ✓ ✓ ✓ model’s parameter list (beta, sig2, ph ptakenone, depends on model, but
specification (2) pcertain, gamma, epsilon) equivalent to model="none"
nclass ✓ number of classes integer ≥ Ls m⁢i⁢n⁢(15CLOSELs,Nu)
initbh ✓ initial stratum boundaries numeric vector depends on algo (3)
algo ✓ algorithm identification "Kozak" or "Sethi" "Kozak"
algo.control ✓ algorithm’s parameters list (maxiter, minsol, idopti, minNh, depends on algo
specification (4) maxstep, maxstill, rep, trymany)
strata ✓ stratified design strata object none (strata is mandatory)
y ✓ study variable numeric vector NULL (model given instead)

R package stratification summary table