var.strata: Anticipated Variances and RRMSE from a Stratified Design for...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/var.strata.R

Description

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.

Usage

1
2
3
4
5
6
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, ...)

Arguments

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 x-vector used to create strata. The default is that Y is not given.

rh

A vector giving the anticipated response rates in each of the Ls sampled strata. A single number can be given if the rates do not vary among strata. The default is to use the rates given in the strata.bh object.

rh.postcorr

A logical. If TRUE, a posterior correction for non-response is applied. This correction takes into account the non-response in the strata.bh object. It is only available when the stratified design strata had a target CV. The default is FALSE, i.e. no posterior correction is made (see Details).

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 "none" if one assumes Y=X, "loglinear" for the loglinear model with mortality, "linear" for the heteroscedastic linear model or "random" for the random replacement model (see stratification-package for a description of these models). The default is "none".

model.control

A list of model parameters (see stratification-package). The default values of the parameters correspond to the model Y=X.

x

An object of class "var.strata" to print.

...

Additional arguments affecting the print produced.

Details

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).

Value

nh

A vector of length L containing the integer sample sizes nh, i.e. the number of units to sample in each stratum. This vector can be different than strata$nh if rh.postcorr=TRUE.

n

The total sample size (sum(nh)). This number can be different than strata$n if rh.postcorr=TRUE.

nhnonint

A vector of length L containing the non-integer values of the sample sizes. This vector can be different than strata$nhnonint if rh.postcorr=TRUE.

certain.info

A vector giving statistics for the certainty stratum (see stratification-package). It contains Nc, the number of units chosen a priori to be in the sample, and meanc, the anticipated mean of Y for these units.

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 strata$args$takenone=0) of the anticipated global mean of Y. This is defined as the squared root of: (bias.penalty x bias of the mean)^2 + variance of the mean.

RRMSE

A numeric: the anticipated relative root mean squared error (or coefficient of variation if strata$args$takenone=0) for the mean of Y, i.e. RMSE divided by mean.

relativebias

A numeric: the anticipated relative bias of the estimator, i.e. (bias.penalty x bias of the mean) divided by mean. If strata$args$takenone=0, this numeric is zero.

propbiasMSE

A numeric: the proportion of the MSE attributable to the bias of the estimator, i.e. (bias.penalty x bias of the mean)^2 divided by the MSE of the mean. If strata$args$takenone=0, this numeric is zero.

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.

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

strata.bh, strata.cumrootf, strata.geo, strata.LH

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)

Example output

Given arguments:
strata = nomodel
y = Sweden$RMT85
rh.postcorr = FALSE

Strata information:
          |      type rh  Nh nh   fh |    E(Y)     Var(Y)
stratum 1 | take-some  1 202 15 0.07 |  100.69    3187.04
stratum 2 | take-some  1  67 11 0.16 |  348.75   26797.29
stratum 3 |  take-all  1  15 15 1.00 | 1726.67 4022741.42
Total                    284 41 0.14                     

Total sample size: 41 
Anticipated population mean: 245.088 
Anticipated CV: 0.05952448 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
strata = nomodel
rh.postcorr = FALSE
model = loglinear : beta = 1.058355 , sig2 = 0.06593083 , ph = 1 1 1

Strata information:
          ph |      type rh  Nh nh   fh |     E(Y)    Var(Y)
stratum 1  1 | take-some  1 202 15 0.07 |  2317.76   1686912
stratum 2  1 | take-some  1  67 11 0.16 |  8129.93  11069752
stratum 3  1 |  take-all  1  15 15 1.00 | 28927.81 809541393
Total                       284 41 0.14                     

Total sample size: 41 
Anticipated population mean: 5094.404 
Anticipated CV: 0.06191284 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
strata = model
y = Sweden$RMT85
rh.postcorr = FALSE

Strata information:
          |      type rh  Nh nh   fh |    E(Y)     Var(Y)
stratum 1 | take-some  1 191 17 0.09 |   95.27    2701.16
stratum 2 | take-some  1  77 20 0.26 |  327.52   26528.41
stratum 3 |  take-all  1  16 16 1.00 | 1636.88 3892258.23
Total                    284 53 0.19                     

Total sample size: 53 
Anticipated population mean: 245.088 
Anticipated CV: 0.04787021 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
x = MRTS
CV = 0.01, Ls = 4, takenone = 0, takeall = 1
allocation: q1 = 0.5, q2 = 0, q3 = 0.5
model = none
algo = Kozak: minsol = 1000, idopti = nh, minNh = 2, maxiter = 10000, 
              maxstep = 100, maxstill = 500, rep = 5, trymany = TRUE

Strata information:
          |      type rh |        bh     E(Y)     Var(Y)   Nh  nh   fh
stratum 1 | take-some  1 |   9776.90  5870.27    6329442  774  77 0.10
stratum 2 | take-some  1 |  18109.06 13622.27    5776240  674  64 0.09
stratum 3 | take-some  1 |  33560.07 23541.14   16377837  375  60 0.16
stratum 4 |  take-all  1 | 486367.49 63348.42 2348818733  177 177 1.00
Total                                                    2000 378 0.19

Total sample size: 378 
Anticipated population mean: 16882.8 
Anticipated CV: 0.00998616 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
strata = LH
rh.postcorr = TRUE
model = none

Strata information:
          |      type   rh   Nh  nh   fh |     E(Y)     Var(Y)
stratum 1 | take-some 0.85  774  91 0.12 |  5870.27    6329442
stratum 2 | take-some 0.90  674  71 0.11 | 13622.27    5776240
stratum 3 | take-some 0.90  375  67 0.18 | 23541.14   16377837
stratum 4 |  take-all 1.00  177 177 1.00 | 63348.42 2348818733
Total                      2000 406 0.20                      

Total sample size: 406 
Anticipated population mean: 16882.8 
Anticipated CV: 0.009970793 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
x = MRTS
CV = 0.01, Ls = 4, takenone = 0, takeall = 1
allocation: q1 = 0.5, q2 = 0, q3 = 0.5
model = none
algo = Kozak: minsol = 1000, idopti = nh, minNh = 2, maxiter = 10000, 
              maxstep = 100, maxstill = 500, rep = 5, trymany = TRUE

Strata information:
          |      type   rh |        bh     E(Y)     Var(Y)   Nh  nh   fh
stratum 1 | take-some 0.85 |   9321.87  5610.42    5749996  723  77 0.11
stratum 2 | take-some 0.90 |  17569.92 13114.00    5718170  691  73 0.11
stratum 3 | take-some 0.90 |  32459.11 22893.97   16019937  402  71 0.18
stratum 4 |  take-all 1.00 | 486367.49 62196.28 2293030306  184 184 1.00
Total                                                      2000 405 0.20

Total sample size: 405 
Anticipated population mean: 16882.8 
Anticipated CV: 0.009975207 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
strata = LH
rh.postcorr = TRUE
model = none

Strata information:
          |      type  rh   Nh  nh   fh |     E(Y)     Var(Y)
stratum 1 | take-some 0.9  774  86 0.11 |  5870.27    6329442
stratum 2 | take-some 0.9  674  71 0.11 | 13622.27    5776240
stratum 3 | take-some 0.9  375  67 0.18 | 23541.14   16377837
stratum 4 |  take-all 0.9  177 177 1.00 | 63348.42 2348818733
Total                     2000 401 0.20                      

Total sample size: 401 
Anticipated population mean: 16882.8 
Anticipated CV: 0.01182816 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.
Given arguments:
x = MRTS
CV = 0.01, Ls = 4, takenone = 0, takeall = 1
allocation: q1 = 0.5, q2 = 0, q3 = 0.5
model = none
algo = Kozak: minsol = 1000, idopti = nh, minNh = 2, maxiter = 10000, 
              maxstep = 100, maxstill = 500, rep = 5, trymany = TRUE

Strata information:
          |      type  rh |        bh     E(Y)     Var(Y)   Nh  nh   fh
stratum 1 | take-some 0.9 |   9507.89  5723.00    5996820  745 124 0.17
stratum 2 | take-some 0.9 |  17569.92 13235.38    5443379  669 106 0.16
stratum 3 | take-some 0.9 |  32130.03 22823.55   15475875  399 107 0.27
stratum 4 |  take-all 0.9 | 486367.49 61716.01 2270390589  187 187 1.00
Total                                                     2000 524 0.26

Total sample size: 524 
Anticipated population mean: 16882.8 
Anticipated CV: 0.009992268 
Note: CV=RRMSE (Relative Root Mean Squared Error) because takenone=0.

stratification documentation built on May 1, 2019, 9:13 p.m.