Compute the sampling error (SE, margin of error, CV) for estimating a
population mean given a sample size. This is the inverse of n_mean().
Usage
prec_mean(var, ...)
# Default S3 method
prec_mean(
var,
n,
mu = NULL,
alpha = 0.05,
N = Inf,
deff = 1,
resp_rate = 1,
...
)
# S3 method for class 'svyplan_n'
prec_mean(var, ...)Arguments
- var
For the default method: population variance \(S^2\). For
svyplan_nobjects: a sample size result fromn_mean().- ...
Additional arguments passed to methods.
- n
Sample size.
- mu
Population mean magnitude (positive). Required for the CV component.
- alpha
Significance level, default 0.05.
- N
Population size.
Inf(default) means no finite population correction.- deff
Design effect multiplier (> 0). Values < 1 are valid for efficient designs (e.g., stratified sampling with Neyman allocation).
- resp_rate
Expected response rate, in (0, 1]. Default 1 (no adjustment). The effective sample size is deflated by
resp_rate.
Details
Computes the standard error for the given sample size and design
parameters, then derives the margin of error and coefficient of
variation. The effective sample size is n * resp_rate / deff, with
optional finite population correction.
See also
n_mean() for the inverse (compute n from a precision target),
prec_prop() for proportions.