b4ddm {samplesize4surveys} | R Documentation |
Statistical power for a hyphotesis testing on a double difference of means.
Description
This function computes the power for a (right tail) test of double difference of means
Usage
b4ddm(
N,
n,
mu1,
mu2,
mu3,
mu4,
sigma1,
sigma2,
sigma3,
sigma4,
D,
DEFF = 1,
conf = 0.95,
T = 0,
R = 1,
plot = FALSE
)
Arguments
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. |
Details
We note that the power is defined as:
1-\Phi(Z_{1-\alpha} - \frac{(D - [(\mu_1 - \mu_2) - (\mu_3 - \mu_4)])}{\sqrt{\frac{1}{n}(1-\frac{n}{N})S^2}})
where
S^2 = DEFF (\sigma_1^2 + \sigma_2^2 + \sigma_3^2 + \sigma_4^2
Value
The power of the test.
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
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)