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

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

1 2 3 4 5 6 |

`strata` |
An object of class "strata", which represents a stratified design. |

`y` |
A vector containing the values of the survey variable |

`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 |

`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 |

`certain.info ` |
A vector giving statistics for the certainty stratum (see |

`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. ( |

`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`

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

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.