Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the power for a (right tail) test of double difference of means
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
N |
The population size. |
n |
The sample size. |
mu1 |
The value of the estimated mean of the variable of interes for the first population. |
mu2 |
The value of the estimated mean of the variable of interes for the second population. |
mu3 |
The value of the estimated mean of the variable of interes for the third population. |
mu4 |
The value of the estimated mean of the variable of interes for the fourth population. |
sigma1 |
The value of the estimated variance of the variable of interes for the first population. |
sigma2 |
The value of the estimated mean of a variable of interes for the second population. |
sigma3 |
The value of the estimated variance of the variable of interes for the third population. |
sigma4 |
The value of the estimated mean of a variable of interes for the fourth population. |
D |
The value of the null effect. |
DEFF |
The design effect of the sample design. By default |
conf |
The statistical confidence. By default |
T |
The overlap between waves. By default |
R |
The correlation between waves. By default |
plot |
Optionally plot the power achieved for an specific sample size. |
We note that the power is defined as:
1-Φ(Z_{1-α} - \frac{(D - [(μ_1 - μ_2) - (μ_3 - μ_4)])}{√{\frac{1}{n}(1-\frac{n}{N})S^2}})
where
S^2 = DEFF (σ_1^2 + σ_2^2 + σ_3^2 + σ_4^2
The power of the test.
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 | b4ddm(N = 100000, n = 400, mu1=50, mu2=55, mu3=50, mu4=55,
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12, D = 7)
b4ddm(N = 100000, n = 400, mu1=50, mu2=55, mu3=50, mu4=65,
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12, D = 12, plot = TRUE)
b4ddm(N = 100000, n = 4000, mu1=50, mu2=55, mu3=50, mu4=65,
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12, D = 11, DEFF = 2, conf = 0.99, plot = TRUE)
|
Loading required package: TeachingSampling
Loading required package: timeDate
With the parameters of this function: N = 1e+05 n = 400 mu1 = mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 55 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = D = 7 DEFF = 1 conf = 0.95 .
The estimated power of the test is 99.99987 .
$Power
[1] 99.99987
With the parameters of this function: N = 1e+05 n = 400 mu1 = mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 65 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = D = 12 DEFF = 1 conf = 0.95 .
The estimated power of the test is 56.72958 .
$Power
[1] 56.72958
With the parameters of this function: N = 1e+05 n = 4000 mu1 = mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 65 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = D = 11 DEFF = 2 conf = 0.99 .
The estimated power of the test is 39.73696 .
$Power
[1] 39.73696
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.