ss4S2 {samplesize4surveys} | R Documentation |
The required sample size for estimating a single variance
Description
This function returns the minimum sample size required for estimating a single variance subjecto to predefined errors.
Usage
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 |
conf |
The statistical confidence. By default conf = 0.95. By default |
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{\alpha}{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 <hagutierrezro at gmail.com>
References
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas
See Also
Examples
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)