Description Usage Arguments Details Value Author(s) References See Also Examples
This function computes the cofficient of variation and the standard error when estimating a double difference of means under a complex sample design.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 
| 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. | 
| 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 errors (cve and margin of error) against the sample size. | 
We note that the coefficent of variation is defined as:
cve = \frac{√{Var((\bar{y}_1 - \bar{y}_2)-(\bar{y}_1 - \bar{y}_2))}}{(\bar{y}_1 - \bar{y}_2)-(\bar{y}_3 - \bar{y}_4)}
Also, note that the magin of error is defined as:
\varepsilon = z_{1-\frac{α}{2}}√{Var((\bar{y}_1 - \bar{y}_2)-(\bar{y}_3 - \bar{y}_4))}
The coefficient of variation and the margin of error for a predefined sample size.
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 | e4ddm(N=10000, n=400, mu1=50, mu2=55, mu3=50, mu4=65, 
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12)
e4ddm(N=10000, n=400, mu1=50, mu2=55, mu3=50, mu4=65, 
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12, plot=TRUE)
e4ddm(N=10000, n=400, mu1=50, mu2=55, mu3=50, mu4=65, 
sigma1 = 10, sigma2 = 12, sigma3 = 10, sigma4 = 12, DEFF=3.45, conf=0.99, plot=TRUE)
 | 
Loading required package: TeachingSampling
Loading required package: timeDate
With the parameters of this function: N = 10000 n =  400 mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 65 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = 12 DEFF =  1 conf = 0.95 . 
             
The estimated coefficient of variation is  21.6444 . 
             
The margin of error is 2.121112 . 
 
$cve
[1] 21.6444
$Margin_of_error
[1] 2.121112
With the parameters of this function: N = 10000 n =  400 mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 65 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = 12 DEFF =  1 conf = 0.95 . 
             
The estimated coefficient of variation is  21.6444 . 
             
The margin of error is 2.121112 . 
 
$cve
[1] 21.6444
$Margin_of_error
[1] 2.121112
With the parameters of this function: N = 10000 n =  400 mu1 = 50 mu2 = 55 mu3 = 50 mu4 = 65 sigma1 = 10 sigma2 = 12 sigma3 = 10 sigma4 = 12 DEFF =  3.45 conf = 0.99 . 
             
The estimated coefficient of variation is  40.20269 . 
             
The margin of error is 5.177763 . 
 
$cve
[1] 40.20269
$Margin_of_error
[1] 5.177763
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.