Compute the sampling error (SE, MOE, CV) for a given multistage sample
allocation. This is the inverse of n_cluster().
Usage
prec_cluster(n, ...)
# Default S3 method
prec_cluster(
n,
...,
icc = NULL,
unit_relvar = 1,
var_ratio = 1,
resp_rate_psu = 1,
resp_rate_ssu = 1,
resp_rate = 1,
plan = NULL
)
# S3 method for class 'svyplan_cluster'
prec_cluster(n, ...)Arguments
- n
For the default method: numeric vector of per-stage sample sizes (
c(n_psu, n_per_psu)for 2-stage orc(n_psu, n_per_psu, n_per_ssu)for 3-stage). Named vectors are accepted with stage namesn_psu,n_per_psu,n_per_ssu. Forsvyplan_clusterobjects: a cluster allocation fromn_cluster().- ...
Additional arguments passed to methods. Unused arguments are rejected.
- icc
Numeric vector of homogeneity measures (length = stages - 1), or a
svyplan_varcompobject.- unit_relvar
Unit relvariance (default 1).
- var_ratio
Ratio of the stage components' unit variance to the analysis variable's, default 1. A scalar names
var_ratio_psu; for three stagesvar_ratio_ssu = var_ratio_psu * (1 - icc_psu)follows from the decomposition. Seedesign_effect().- resp_rate_psu
Expected PSU-level response rate, in (0, 1]. Default 1 (no adjustment). The effective stage-1 size is
n * resp_rate_psu. It describes clusters that cannot be worked, not nonresponse among the ultimate units inside a cluster.- resp_rate_ssu
Expected SSU-level response rate, in (0, 1]. Three-stage designs only; default 1. The effective stage-2 size is
n[2] * resp_rate_ssu.- resp_rate
Expected ultimate-unit response rate, in (0, 1]. Default 1. It scales the final stage, so it also shrinks the realized cluster and therefore the clustering penalty. See
n_cluster()for the decomposition.- plan
Optional
svyplan()object providing design defaults.
Value
A svyplan_prec object with components $se, $moe, and $cv.
Because the cluster model is parameterized with unit relvariance
(unit_relvar = S^2 / Y_bar^2), only $cv is computable. The $se and
$moe components are NA.
Details
prec_cluster() is the inverse of n_cluster(): given per-stage
sample sizes, it computes the achieved precision. You can pass the
result of n_cluster() directly: prec_cluster(n_cluster(...)).
Stage count is determined by length(n).
2-stage (Valliant et al., 2018, Eq. 9.2.23): $$CV = \sqrt{\frac{V \cdot k}{n_1 \cdot n_2} (1 + \delta (n_2 - 1))}$$
3-stage: $$CV = \sqrt{\frac{V}{n_1 \cdot n_2 \cdot n_3} (k_1 \delta_1 n_2 n_3 + k_2 (1 + \delta_2 (n_3 - 1)))}$$
References
Valliant, R., Dever, J. A., and Kreuter, F. (2018). Practical Tools for Designing and Weighting Survey Samples (2nd ed.). Springer. Ch. 9.
See also
n_cluster() for the inverse operation, varcomp() for
estimating variance components.
Other precision functions:
prec_alloc(),
prec_change(),
prec_mean(),
prec_multi(),
prec_multi_cluster(),
prec_panel(),
prec_pooled(),
prec_prop(),
prec_twophase()
Examples
# Direct usage
prec_cluster(n = c(50, 12), icc = 0.05)
#> Sampling precision for 2-stage cluster
#> n_psu = 50 | n_per_psu = 12 -> total n = 600
#> cv = 0.0508
prec_cluster(n = c(50, 12, 8), icc = c(0.01, 0.05))
#> Sampling precision for 3-stage cluster
#> n_psu = 50 | n_per_psu = 12 | n_per_ssu = 8 -> total n = 4800
#> cv = 0.0219
# Round-trip from n_cluster
res <- n_cluster(stage_cost = c(500, 50), icc = 0.05, cv = 0.05)
prec_cluster(res)
#> Sampling precision for 2-stage cluster
#> n_psu = 48 | n_per_psu = 14 -> total n = 672
#> cv = 0.0500