Description Usage Arguments Value See Also Examples
The function computes expected precision as variance, standard error, and coefficient of variation for the estimates.
1 2 3 4 5 6 7 8 9 10 11 12 |
Yh |
The expected totals for variables of interest in each stratum. Object convertible to |
Zh |
Optional variables of denominator for the expected ratio estimation in each stratum. Object convertible to |
H |
The stratum variable. One dimensional object convertible to one-column |
s2h |
The expected population variance S^2 for variables of interest in each stratum. Variables is defined the same arrangement as |
nh |
Sample size in each stratum. One dimensional object convertible to one-column |
poph |
Population size in each stratum. One dimensional object convertible to one-column |
Rh |
The expected response rate in each stratum (optional). If not defined, it is assumed to be 1 in each stratum (full-response). Object convertible to one-column |
deffh |
The expected design effect for the estimates of totals (optional). If not defined, it is assumed to be 1 for each variable in each stratum. If is defined, then variables is defined the same arrangement as |
Dom |
Optional variables used to define population domains. Only domains as unions of strata can be defined. If supplied, estimated precision is calculated for each domain. An object convertible to |
dataset |
Optional survey data object convertible to |
A list with three data objects:
resultH |
An object as |
resultDom |
An object as |
result |
An object as |
1 2 3 4 5 6 7 8 9 10 11 12 13 | library("data.table")
data <- data.table(H = 1:3, Yh = 10 * 1:3,
Yh1 = 10 * 4:6, s2h = 10 * runif(3),
s2h2 = 10 * runif(3), nh = rep(4 * 1:3),
poph = 8 * 1:3, Rh = rep(1, 3),
deffh = rep(2, 3), deffh2 = rep(3, 3))
vars <- expvar(Yh = c("Yh", "Yh1"), H = "H",
s2h = c("s2h", "s2h2"),
nh = "nh", poph = "poph",
Rh = "Rh", deffh = c("deffh", "deffh2"),
dataset = data)
vars
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.