# ss4S2: The required sample size for estimating a single variance In samplesize4surveys: Sample Size Calculations for Complex Surveys

## Description

This function returns the minimum sample size required for estimating a single variance subjecto to predefined errors.

## Usage

 1 2 ss4S2(N, K = 0, DEFF = 1, conf = 0.95, cve = 0.05, me = 0.03, plot = FALSE) 

## Arguments

 N The population size. K The population excess kurtosis of the variable in the population. DEFF The design effect of the sample design. By default DEFF = 1, which corresponds to a simple random sampling design. conf The statistical confidence. By default conf = 0.95. By default conf = 0.95. cve The maximun coeficient of variation that can be allowed for the estimation. me The maximun margin of error that can be allowed for the estimation. plot Optionally plot the errors (cve and margin of error) against the sample size.

## Details

Note that the minimun sample size to achieve a particular relative margin of error \varepsilon is defined by:

n = \frac{n_0}{\frac{(N-1)^3}{N^2(N*K+2N+2)}+\frac{n_0}{N}}

Where

n_0=\frac{z^2_{1-\frac{α}{2}}*DEFF}{\varepsilon^2}

Also note that the minimun sample size to achieve a particular coefficient of variation cve is defined by:

n = \frac{N^2(N*K+2N+2)*DEFF}{cve^2*(N-1)^3+N(N*K+2N+2)*DEFF}

## Author(s)

Hugo Andres Gutierrez Rojas <hugogutierrez at usantotomas.edu.co>

## References

Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas

e4p
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ss4S2(N = 10000, K = 0, cve = 0.05, me = 0.03) ss4S2(N = 10000, K = 1, cve = 0.05, me = 0.03) ss4S2(N = 10000, K = 1, cve = 0.05, me = 0.05, DEFF = 2) ss4S2(N = 10000, K = 1, cve = 0.05, me = 0.03, plot = TRUE) ############################# # Example with BigLucy data # ############################# data(BigLucy) attach(BigLucy) N <- nrow(BigLucy) K <- kurtosis(BigLucy\$Income) # The minimum sample size for simple random sampling ss4S2(N, K, DEFF=1, conf=0.99, cve=0.03, me=0.1, plot=TRUE) # The minimum sample size for a complex sampling design ss4S2(N, K, DEFF=3.45, conf=0.99, cve=0.03, me=0.1, plot=TRUE)