Description Usage Arguments Details Author(s) References See Also Examples
This function returns the minimum sample size required for estimating a single variance subjecto to predefined errors.
1 |
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. |
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}
Hugo Andres Gutierrez Rojas <hagutierrezro at gmail.com>
Gutierrez, H. A. (2009), Estrategias de muestreo: Diseno de encuestas y estimacion de parametros. Editorial Universidad Santo Tomas
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.