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 two- or three-stage 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

Stratified designs

Size or evaluate an allocation across strata or domains, under a budget or a CV target.

n_alloc()
Constrained stratified allocation
prec_alloc()
Precision for a constrained allocation
n_alloc-generalized
Joint constrained allocation, and the design a budget buys
strata_bound()
Strata boundaries for survey design
predict(<svyplan_strata>)
Assign observations to strata

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_n>) confint(<svyplan_prec>)
Confidence intervals for svyplan results

Format and display svyplan objects.

print(<svyplan_n>) print(<svyplan_cluster>) print(<svyplan_prec>) print(<svyplan_varcomp>) print(<svyplan_power>) format(<svyplan_n>) format(<svyplan_cluster>) format(<svyplan_prec>) format(<svyplan_varcomp>) format(<svyplan_power>) as.integer(<svyplan_n>) as.double(<svyplan_n>) as.integer(<svyplan_cluster>) as.double(<svyplan_cluster>) as.data.frame(<svyplan_n>) 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>) print(<svyplan_strata>) format(<svyplan_strata>) as.data.frame(<svyplan_strata>) as.integer(<svyplan_strata>) as.double(<svyplan_strata>) print(<svyplan_twophase>)
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>)
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>)
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>)
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, summarise, format and coerce a panel recruitment
print(<svyplan_rotation>) format(<svyplan_rotation>) as.double(<svyplan_rotation>) as.data.frame(<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, summarise and coerce a longitudinal design schedule
summary(<svyplan_n>) summary(<svyplan_prec>) print(<summary.svyplan_bethel>) print(<summary.svyplan_alloc>)
Summarize stratified allocation results
summary(<svyplan_twophase>) print(<summary.svyplan_twophase>)
Analyse a two-phase allocation

Predict methods

Grid exploration for svyplan objects.

Plot methods

Plot svyplan objects.