astrata: Stratum allocation

Description Usage Arguments Examples

View source: R/astrata.R

Description

Allocates cases to strata using different methods.

Usage

1
2
astrata(samplesize, N, method = "mixed", min = 1, wp = 1, e = NULL,
  deff = 1, rr = 1, p = 0.5)

Arguments

samplesize

Total sample size expected. Not needed when the method used is error.

N

Population size. If the population size is not specified, MOEs are estimated assumming an infinite population.

method

Allocation can be assigned using different methods. The default method is mixed.

  • mixed: Combines equal and proportional allocation across strata. The weight of the proportional assigment needs to be defined using wp. If wp = 1 (default value), the strata allocation is proportional. If wp = 0, the strata allocation is equal (same size per stratum). If wp is any number between 0 and 1, the strata allocation will be a combination between equal size and proportionality across strata.

  • error: The sample size of strata is based on a margin of error. e needs to be specified.

  • neyman: Uses Neyman allocation. It assigns sample units within each stratum proportional to the product of the population stratum size and the within-stratum standard deviation, so that minimum variance for a population mean estimator can be achieved.

  • root: Assigns sample units proportionality using the square root of the population sizes.

  • stdev: It assigns sample units proportional to the standard deviation across strata.

min

Minimum sample size expected per stratum. Default value is 1.

wp

Weight of the proportional allocation. This is only needed when the method is mixed. If wp = 1 (default value), the strata allocation will be completly propotional. If wp = 0, the strata allocation will be completely equal.

e

Margin of error. Only needed if method is error.

deff

Design effect (DEff). Generally, from previous studies or estimations.

rr

Value or vector of values with the expected response rate, it migth higher than 0 and lower than 1.

p

Value or vector of values with population proportions to be estimated by stratum.

Examples

1
astrata(200, c(200, 300, 500))

sdaza/sampler documentation built on June 22, 2020, 4:51 a.m.