Skip to contents

Drawing a sample

One verb, and the designs it takes.

draw()
Draw a sample
designs
Sampling designs
plot(<drawn_design>)
Picture a sampling design
is_design()
Is this a sampling design?
draw_design()
Design-specific draw method

What a design knows before you draw

The probabilities that make a sample estimable.

inclusion_prob() sampling_weight()
Inclusion probabilities and design weights
joint_prob()
Joint inclusion probabilities

Estimating from a sample

Totals, means and proportions, overall or by domain, with the variance estimator the design calls for and a design effect.

ht_total()
Estimate a population total from a sample
ht_mean()
Estimate a population mean
deff()
Design effect

Planning and checking

How many rows to draw, what you actually got, and where to go next.

plan_size()
How large a sample do you need?
sample_summary()
Describe a drawn sample
as_svydesign()
Hand a sample to the survey package

Equal-probability designs

Every unit equally likely, or equally likely within a group.

design_simple()
Simple random sampling
design_systematic()
Systematic sampling
design_stratified()
Stratified sampling
design_reservoir()
Reservoir sampling

Cluster designs

Sample groups, then optionally sample within them.

design_cluster()
Cluster sampling
design_multistage()
Multi-stage sampling

Unequal-probability designs

Selection driven by size, and units too big to leave to chance.

design_weighted()
Weighted sampling
design_certainty()
Take some rows with certainty, sample the rest

Space and time

A sample spread evenly over a map or over covariates, restricted to a region, or taken across time intervals.

design_spread()
Spatially balanced sampling
design_spatial()
Sampling within a region
design_temporal()
Temporal sampling

Resampling

design_bootstrap()
Bootstrap sampling