Skip to contents

Tools for survey sample size determination, precision analysis, optimal allocation, joint multivariate and multidomain allocation, two-phase allocation, stratification, power analysis, and planning for surveys repeated over time. Computes sample sizes for proportions, means and ratios of two totals, evaluates sampling precision for a given design, optimizes multistage cluster allocations, estimates variance components from frame data, computes design effects, constructs strata boundaries, allocates two-phase designs, sizes the change between two occasions, derives the sample overlap a rotation schedule produces, sizes the recruitment a panel needs to hold a responding sample against attrition, constructs explicit rotating-panel fieldwork schedules, and performs statistical power analysis for two-sample tests. Sample size and precision functions support response rate adjustment and bidirectional round-trip via S3 dispatch. Sensitivity analysis is available through predict methods. Based on methods from Cochran (1977, ISBN:978-0-471-16240-7), Kish (1965, ISBN:978-0-471-48900-9), Saerndal, Swensson, and Wretman (1992, ISBN:978-0-387-40620-6), Fuller (2009, ISBN:978-0-470-45460-2), and Valliant, Dever, and Kreuter (2018, ISBN:978-3-319-93630-4).

Where svyplan stops

svyplan stops at the plan. It decides how many units, allocated where, to what precision, and it never draws a sample: no selection probabilities, no weights, no drawn units come out of any function here. What you get is the design a sampler is then asked to realize.

When the plan is settled, sondage draws it. Analysis of the realized sample belongs to survey or srvyr.

Nonresponse adjustment

Dividing by resp_rate is an expected-information calculation. It sets the expected respondent count and evaluates variance at that net size. It assumes response is ignorable under the adjustment planned for analysis. No sample-size inflation removes nonresponse bias, and this calculation does not include variance from response weights. Informative nonresponse calls for modeling, weighting, follow-up design, or sensitivity analysis over resp_rate. n_twophase() provides the package's explicit nonresponse follow-up design, and predict() supports sensitivity grids.

Which function

Eleven problems, each with the function or pair that answers it. Every n_ has a prec_ reading the same design back the other way, so a row names one thing to learn rather than two.

I want to size, or evaluateFunctions
a proportion, a mean or a ratio of two totalsn_prop()/prec_prop(), n_mean()/prec_mean(), n_ratio()/prec_ratio()
several indicators at once, taking the most demandingn_multi()/prec_multi()
a two- or three-stage cluster design, for one indicator or a table of themn_cluster()/prec_cluster()
an allocation across strata or domains, under a budget or a CV targetn_alloc()/prec_alloc(), strata_bound()
a two-phase design that screens or follows upn_twophase()/prec_twophase()
a change between two occasions of a repeated surveyn_change()/prec_change()
the average of several occasions of a repeated surveyn_pooled()/prec_pooled()
a panel that must still deliver a sample after attritionn_panel()/prec_panel()
the overlap and field schedule a rotation pattern producesdesign_rotation(), design_overlap(), design_schedule()
the power of a two-group comparison or a difference-in-differencespower_prop(), power_mean(), power_did()
the design effect, effective size or degrees of freedom of a plandesign_effect(), effective_n(), design_df(), varcomp()

Notation

Argument names spell out what a quantity is rather than reproducing the symbol used in any one textbook. Readers coming from the standard references can map them as follows.

ArgumentSymbolMeaning
icc\(\delta\)Design-based measure of homogeneity within clusters, \(V_b/(V_b+V_w)\). Constrained to \([0, 1]\), so it is not interchangeable with a mixed-model ICC, which can be negative. Written \(\delta\) by Valliant, Dever and Kreuter (2018) and related to Kish's roh.
var_ratio\(k\)Ratio of the stage components' unit variance to the analysis variable's. Defaults to 1.
unit_relvar\(V\)Unit relvariance, \(S^2/\bar{y}^2\), that is the squared population coefficient of variation.
deff\(DEFF\)Design effect.
n_psu\(n_1\)Number of PSUs selected.
n_per_psu\(n_2\)Units selected per PSU, which is a sample take, not the PSU's population size.
n_per_ssu\(n_3\)Units selected per SSU.
moe\(e\)Margin of error, the half-width of the confidence interval.
cv\(CV\)Coefficient of variation, the relative standard error.
overlap, overlap_cor\(\gamma\), \(\rho\)Panel overlap fraction and the correlation between occasions.
alloc_q\(q\)Bankier power-allocation exponent, used only when alloc = "power". It is unrelated to statistical power.

Dispersion may be given as either var or sd wherever a mean is being planned, and exactly one is required. The exception is n_twophase(), whose frame takes sd only.

References

Cochran, W. G. (1977). Sampling Techniques, 3rd edition. Wiley.

Kish, L. (1965). Survey Sampling. Wiley.

Valliant, R., Dever, J. A., and Kreuter, F. (2018). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. Springer.

Author

Maintainer: Ahmadou Dicko mail@ahmadoudicko.com (ORCID)

Authors: