Learn R Programming

⚠️There's a newer version (1.6) of this package.Take me there.

PracTools (version 1.2.5)

Tools for Designing and Weighting Survey Samples

Description

Functions and datasets to support Valliant, Dever, and Kreuter, Practical Tools for Designing and Weighting Survey Samples (2nd edition, 2018). Contains functions for sample size calculation for survey samples using stratified or clustered one-, two-, and three-stage sample designs. Other functions compute variance components for multistage designs and sample sizes in two-phase designs. A number of example data sets are included.

Copy Link

Version

Install

install.packages('PracTools')

Monthly Downloads

722

Version

1.2.5

License

GPL (>= 2)

Maintainer

Richard Valliant

Last Published

January 18th, 2022

Functions in PracTools (1.2.5)

deffCR

Chen-Rust design effect
deffH

Henry design effect for pps sampling and GREG estimation of totals
labor

Labor force population
deff

Design effects of various types
clusOpt3fixedPSU

Compute optimal number of sample secondary sampling units (SSUs) and elements per SSU for a fixed set of primary sampling units (PSUs) in a three-stage sample
deffK

Kish design effect
nWilson

Calculate a simple random sample size for estimating a proportion
deffS

Spencer design effect for pps sampling
nhispart

National Health Interview Survey data from 2003: socioeconomic variables
nPropMoe

Simple random sample size for a proportion based on margin of error
pclass

Form nonresponse adjustment classes based on propensity scores
ThirdGrade

Third grade population
nAuditAttr

Sample sizes for an attribute sample in an audit
BW2stagePPSe

Estimated relvariance components for 2-stage sample
BW2stagePPS

Relvariance components for 2-stage sample
strAlloc

Allocate a sample to strata
nCont

Compute a simple random sample size for an estimated mean
wtdvar

Compute weighted variance
nContMoe

Compute a simple random sample size for an estimated mean of a continuous variable based on margin of error
mibrfss

Michigan Behavioral Risk Factor Surveillance Survey
nProp2sam

Simple random sample size for difference in proportions
nProp

Compute simple random sample size for estimating a proportion
clusOpt2

Compute optimal sample sizes for a two-stage sample
smho.N874

Survey of Mental Health Organizations Data
smho98

Survey of Mental Health Organizations Data
nDep2sam

Simple random sample size for difference in means
BW3stagePPS

Relvariance components for 3-stage sample
nhis

National Health Interview Survey: Demographic variables
BW2stageSRS

Relvariance components for 2-stage sample
gamEst

Estimate variance model parameter \(\gamma\)
dub

Sample sizes for a double sampling design
NRFUopt

Sample sizes for a nonresponse follow-up study
nhis.large

National Health Interview Survey: Demographic and health variables
hospital

Hospital Data
gammaFit

Iteratively estimate variance model parameter \(\gamma\)
NRadjClass

Class-based nonresponse adjustments
nDomain

Compute a simple random sample size for an estimated mean or total for a domain
nLogOdds

Calculate simple random sample size for estimating a proportion
Domainy1y2

Domain data
BW3stagePPSe

Estimated relvariance components for 3-stage sample
CVcalc3

Coefficient of variation of an estimated total in a 3-stage sample
clusOpt3

Compute optimal sample sizes for a three-stage sample
clusOpt2fixedPSU

Optimal number of sample elements per PSU in a two-stage sample when the sample of PSUs is fixed
CVcalc2

Coefficient of variation of an estimated total in a 2-stage sample
HMT

Generate an HMT population
MDarea.pop

Maryland area population