svyplan: Survey Sample Size Determination and Precision Analysis
Source:R/svyplan-package.R
svyplan-package.RdTools 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-93631-4).
Where svyplan stops
svyplan stops at the plan. It decides how many units, allocated where, to what precision. It reports stratum-level design quantities such as sizes, sampling fractions and base weights. It never draws a sample and never attaches selection probabilities or weights to units.
When the plan is settled, sondage draws it. Analysis of the realized sample belongs to survey or srvyr.
Nonresponse adjustment
eligibility_rate and resp_rate together turn the units issued into
the units that respond. eligibility_rate is the share of issued units in
scope, such as dwellings found occupied. resp_rate is the response rate
among eligible units, the rate defined by the Standard Definitions of the
American Association for Public Opinion Research (AAPOR) and published in
survey reports, which leaves units out of scope out of its denominator. A
unit whose eligibility was never established counts against both, in the
share the survey estimates to be in scope, AAPOR's e.
A plan combines four quantities. eligibility_rate is the share of
issued units in scope. resp_rate is the response rate among them, such
as a household response rate. eligible_per_unit is the number of
eligible persons per responding unit, such as women aged 15 to 49 per
household, and can exceed 1. The response rate among eligible persons,
such as a women's response rate, is a second stage of response, and it
multiplies resp_rate when the indicator is about persons.
N counts the issued frame units, vacant dwellings included. The
population the estimate describes is N * eligibility_rate, which is what
the finite population correction reads, and in n_alloc() the stratum
weights too. The caps on the sample stay in frame units.
A survey that publishes households selected, occupied and interviewed,
as DHS and MICS do, gives eligibility_rate as the households occupied
over the households selected, and resp_rate as its household response
rate. Passing the households interviewed over the households selected as
resp_rate, with eligibility_rate left at 1, gives the same size when
N is infinite. With a finite N it asks for slightly more units, since
it counts the units out of scope as part of the population.
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
Each row identifies a planning problem and the functions that address it.
The paired prec_ functions evaluate precision under the corresponding
sizing model.
| I want to size, or evaluate | Functions |
| a proportion, a mean or a ratio of two totals | n_prop()/prec_prop(), n_mean()/prec_mean(), n_ratio()/prec_ratio() |
| several indicators at once, taking the most demanding | n_multi()/prec_multi() |
| a two- or three-stage cluster design, for one indicator or a table of them | n_cluster()/prec_cluster() |
| an allocation across strata or domains, under a budget or a CV target | n_alloc()/prec_alloc(), strata_bound() |
| a two-phase design that screens or follows up | n_twophase()/prec_twophase() |
| a change between two occasions of a repeated survey | n_change()/prec_change() |
| the average of several occasions of a repeated survey | n_pooled()/prec_pooled() |
| a panel that must still deliver a sample after attrition | n_panel()/prec_panel() |
| the overlap and field schedule a rotation pattern produces | design_rotation(), design_overlap(), design_schedule() |
| the power of a two-group comparison or a difference-in-differences | power_prop(), power_mean(), power_did() |
| the design effect, effective size or degrees of freedom of a plan | design_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.
| Argument | Symbol | Meaning |
icc | \(\delta\) | Measure of homogeneity in the multistage
sampling variance decomposition. For two stages, \(V_b/(V_b+V_w)\),
in \([0, 1]\) for nonnegative components with a positive sum.
Written \(\delta\) by Valliant, Dever, and Kreuter (2018).
Related to conventional ICCs and Kish's roh, but not generally
numerically identical. See varcomp() for the definitions. |
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_measure | \(X_h\) | Positive stratum measure for Bankier allocation, supplied as a frame column. Defaults to \(N_h|\mu_h|\). |
alloc_q | \(q\) | Bankier 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:
Ahmadou Dicko mail@ahmadoudicko.com (ORCID)