Skip to contents

Overview

Package overview and the argument-to-symbol notation map.

svyplan-package
svyplan: Survey Sample Size Determination and Precision Analysis

Proportions, means and ratios

Size or evaluate a proportion, a mean or a ratio of two totals.

n_prop()
Sample size for a proportion
prec_prop()
Sampling precision for a proportion
n_mean()
Sample size for a mean
prec_mean()
Sampling precision for a mean
n_ratio()
Sample size for a ratio of two totals
prec_ratio()
Precision of a ratio of two totals at a given sample size

Several indicators at once

Size or evaluate several indicators at once, taking the most demanding.

n_multi()
Multi-indicator sample size
prec_multi()
Multi-indicator sampling precision

Cluster designs

Size or evaluate a multistage cluster design, for one indicator or a table of them.

n_cluster()
Optimal multistage cluster allocation
prec_cluster()
Sampling precision for a multistage cluster allocation
varcomp()
Estimate variance components

Classic stratified allocation

Allocate a fixed total across strata or domains, meet a precision target, or work within a budget.

n_alloc()
Stratified sample allocation
prec_alloc()
Precision of a stratified allocation
strata_bound()
Strata boundaries for survey design
predict(<svyplan_strata>)
Assign observations to strata

Joint allocation and PSU registers

Plan one allocation for multiple indicators or overlapping domains, including certainty-aware two-stage designs from a PSU register.

n_alloc_joint()
Joint constrained stratified allocation
prec_alloc_joint()
Precision of a joint constrained stratified allocation
merge_psus()
Merge small PSUs up to a minimum size

Two-phase designs

Size or evaluate a two-phase design that screens or follows up.

n_twophase()
Two-phase sample allocation
prec_twophase()
Precision of a two-phase allocation

Repeated surveys

Size or evaluate a change between two occasions, the average of several, or a panel that must survive attrition, and describe the rotation the three share.

n_change()
Sample size for a change between two occasions
prec_change()
Sampling precision for a change between two occasions
n_pooled()
Sample size for the average of several occasions of a repeated survey
prec_pooled()
Precision of the average of several occasions of a repeated survey
n_panel()
Recruitment size for a panel that loses units between waves
prec_panel()
Precision a panel recruitment delivers, wave by wave
design_rotation()
Rotation pattern of a repeated survey
design_overlap()
Sample overlap a rotation produces
design_schedule()
Construct an operational schedule from a rotating panel plan

Power

Find the power of a two-group comparison or a difference-in-differences.

power_prop()
Power analysis for proportions
power_mean()
Power analysis for means
power_did()
Power analysis for difference-in-differences designs

Design inputs

Reusable design defaults, and the design effect, effective size and degrees of freedom a plan implies.

svyplan() update(<svyplan>)
Survey plan profile
design_effect()
Planning design effect
effective_n()
Effective sample size
design_df()
Design degrees of freedom

Confidence intervals

Confidence intervals for a planned design.

confint(<svyplan_alloc>) confint(<svyplan_n>) confint(<svyplan_prec>)
Confidence intervals for svyplan results

Format and display svyplan objects.

print(<svyplan_strata>) format(<svyplan_strata>) as.data.frame(<svyplan_strata>) as.integer(<svyplan_strata>) as.double(<svyplan_strata>) print(<svyplan_twophase>) print(<svyplan_n>) print(<svyplan_alloc>) print(<svyplan_cluster>) print(<svyplan_prec>) print(<svyplan_varcomp>) print(<svyplan_power>) format(<svyplan_n>) format(<svyplan_alloc>) format(<svyplan_cluster>) format(<svyplan_prec>) format(<svyplan_twophase>) format(<svyplan_varcomp>) format(<svyplan_power>) as.integer(<svyplan_n>) as.double(<svyplan_n>) as.integer(<svyplan_alloc>) as.double(<svyplan_alloc>) as.data.frame(<svyplan_alloc>) as.integer(<svyplan_cluster>) as.double(<svyplan_cluster>) as.data.frame(<svyplan_n>) as.data.frame(<svyplan_twophase>) as.data.frame(<svyplan_prec>) as.data.frame(<svyplan_varcomp>) as.data.frame(<svyplan_cluster>) as.integer(<svyplan_power>) as.double(<svyplan_power>) as.data.frame(<svyplan_power>) summary(<svyplan>) summary(<svyplan_power>) summary(<svyplan_strata>) summary(<svyplan_varcomp>) summary(<svyplan_overlap>) summary(<svyplan_rotation>)
Print svyplan objects
print(<svyplan_deff>) summary(<svyplan_deff>) print(<summary.svyplan_deff>) format(<svyplan_deff>) as.double(<svyplan_deff>) as.list(<svyplan_deff>) `$`(<svyplan_deff>) `[[`(<svyplan_deff>) as.data.frame(<svyplan_deff>) Ops(<svyplan_deff>) Math(<svyplan_deff>) `[<-`(<svyplan_deff>) `[[<-`(<svyplan_deff>) `$<-`(<svyplan_deff>)
Print and coerce planning design effects
print(<svyplan_df>) summary(<svyplan_df>) print(<summary.svyplan_df>) format(<svyplan_df>) as.double(<svyplan_df>) as.list(<svyplan_df>) `$`(<svyplan_df>) `[[`(<svyplan_df>) as.data.frame(<svyplan_df>) Ops(<svyplan_df>) Math(<svyplan_df>) `[<-`(<svyplan_df>) `[[<-`(<svyplan_df>) `$<-`(<svyplan_df>)
Print and coerce design degrees of freedom
print(<svyplan_overlap>) format(<svyplan_overlap>) as.double(<svyplan_overlap>) as.list(<svyplan_overlap>) `[`(<svyplan_overlap>) Ops(<svyplan_overlap>) Math(<svyplan_overlap>) `[[`(<svyplan_overlap>) `$`(<svyplan_overlap>) as.data.frame(<svyplan_overlap>) `[<-`(<svyplan_overlap>) `[[<-`(<svyplan_overlap>) `$<-`(<svyplan_overlap>)
Print, format and coerce a rotation overlap
print(<svyplan_panel>) summary(<svyplan_panel>) print(<summary.svyplan_panel>) format(<svyplan_panel>) as.double(<svyplan_panel>) as.integer(<svyplan_panel>) as.data.frame(<svyplan_panel>)
Print, summarize, format and coerce a panel recruitment
print(<svyplan_rotation>) format(<svyplan_rotation>) as.double(<svyplan_rotation>) as.data.frame(<svyplan_rotation>) `$`(<svyplan_rotation>) Ops(<svyplan_rotation>) Math(<svyplan_rotation>) `[<-`(<svyplan_rotation>) `[[<-`(<svyplan_rotation>) `$<-`(<svyplan_rotation>)
Print, format and coerce a rotation pattern
print(<svyplan_schedule>) summary(<svyplan_schedule>) print(<summary.svyplan_schedule>) format(<svyplan_schedule>) as.data.frame(<svyplan_schedule>) `$<-`(<svyplan_schedule>) `[<-`(<svyplan_schedule>) `[[<-`(<svyplan_schedule>)
Print, summarize and coerce a longitudinal design schedule
summary(<svyplan_n>) summary(<svyplan_cluster>) print(<summary.svyplan_n>) print(<summary.svyplan_cluster>)
Summarize sample size and cluster results
summary(<svyplan_prec>) print(<summary.svyplan_bethel>) print(<summary.svyplan_alloc>) summary(<svyplan_alloc>) summary(<svyplan_alloc_joint>)
Summarize stratified allocation results
summary(<svyplan_twophase>) print(<summary.svyplan_twophase>)
Analyze a two-phase allocation

Predict methods

Grid exploration for svyplan objects.

Plot methods

Plot svyplan objects.