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)
|
Loading required package: TeachingSampling
Loading required package: timeDate
With the parameters of this function: N = 10000 DEFF = 1 conf = 0.95 .
The estimated sample size to obtain a maximun coefficient of variation of 5 % is n= 742 .
The estimated sample size to obtain a maximun relative margin of error of 3 % is n= 4607 .
$n.cve
[1] 742
$n.me
[1] 4607
With the parameters of this function: N = 10000 DEFF = 1 conf = 0.95 .
The estimated sample size to obtain a maximun coefficient of variation of 5 % is n= 1072 .
The estimated sample size to obtain a maximun relative margin of error of 3 % is n= 5616 .
$n.cve
[1] 1072
$n.me
[1] 5616
With the parameters of this function: N = 10000 DEFF = 2 conf = 0.95 .
The estimated sample size to obtain a maximun coefficient of variation of 5 % is n= 1937 .
The estimated sample size to obtain a maximun relative margin of error of 5 % is n= 4798 .
$n.cve
[1] 1937
$n.me
[1] 4798
With the parameters of this function: N = 10000 DEFF = 1 conf = 0.95 .
The estimated sample size to obtain a maximun coefficient of variation of 5 % is n= 1072 .
The estimated sample size to obtain a maximun relative margin of error of 3 % is n= 5616 .
$n.cve
[1] 1072
$n.me
[1] 5616
With the parameters of this function: N = 85296 DEFF = 1 conf = 0.99 .
The estimated sample size to obtain a maximun coefficient of variation of 3 % is n= 5997 .
The estimated sample size to obtain a maximun relative margin of error of 10 % is n= 3686 .
$n.cve
[1] 5997
attr(,"method")
[1] "excess"
$n.me
[1] 3686
attr(,"method")
[1] "excess"
With the parameters of this function: N = 85296 DEFF = 3.45 conf = 0.99 .
The estimated sample size to obtain a maximun coefficient of variation of 3 % is n= 17650 .
The estimated sample size to obtain a maximun relative margin of error of 10 % is n= 11498 .
$n.cve
[1] 17650
attr(,"method")
[1] "excess"
$n.me
[1] 11498
attr(,"method")
[1] "excess"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.