diffpwr.dep {diffcor} | R Documentation |
Monte Carlo Simulation for the correlation difference between dependent correlations
Description
Computation of a Monte Carlo simulation to estimate the statistical power of the comparison between the correlations of a variable with two competing variables that are also correlated with each other.
Usage
diffpwr.dep(n, r12, r13, r23, alpha = 0.05, n.samples = 1000, seed = 1234)
Arguments
n |
Sample size to be tested in the Monte Carlo simulation. |
r12 |
Correlation between the criterion with which both competing variables are correlated and the first of the two competing variables. |
r13 |
Correlation between the criterion with which both competing variables are correlated and the second of the two competing variables. |
r23 |
Intercorrelation between the two competing variables. |
alpha |
Type I error. Default is .05. |
n.samples |
Number of samples generated in the Monte Carlo simulation. The recommended minimum is 1000 iterations, which is also the default. |
seed |
To make the results reproducible, it is recommended to set a random seed. |
Details
Depending on the number of generated samples ('n.samples'), correlation coefficients of the sizes 'r12', 'r13', and 'r23' are simulated. For each simulated sample, it is checked whether the correlations r12 and r13 differ, given the correlation 'r23'. The ratio of simulated z-tests of the correlation difference tests exceeding the critical z-value, given the intended alpha-level, equals the achieved statistical power ('n'; see Muthén & Muthén, 2002 <doi:10.1207/S15328007SEM0904_8>; Robert & Casella, 2010 <doi:10.1007/978-1-4419-1576-4>, for overviews of the Monte Carlo method).
Value
r12 |
Correlation between the criterion with which both competing variables are correlated and the first of the two competing variables. |
cov12 |
Coverage. Indicates the ratio of simulated confidence intervals including the assumed effect size r12. |
bias12 |
Average relative deviation of the simulated correlations r12 from the intended one. |
r13 |
Correlation between the criterion with which both competing variables are correlated and the second of the two competing variables. |
cov13 |
Coverage. Indicates the ratio of simulated confidence intervals including the assumed effect size r13. |
bias13 |
Average relative deviation of the simulated correlations r13 from the intended one. |
r23 |
Intercorrelation between the two competing variables. |
cov23 |
Coverage. Indicates the ratio of simulated confidence intervals including the assumed effect size r23. |
bias23 |
Average relative deviation of the simulated correlations r23 from the intended one. |
n |
Sample size to be tested in the Monte Carlo simulation. |
pwr |
Statistical power as the ratio of simulated difference tests that yielded significance. |
Biases should be as close to zero as possible and coverage should be ideally between .91 and .98 (Muthén & Muthén, 2002 <doi:10.1207/S15328007SEM0904_8>).
Author(s)
Christian Blötner c.bloetner@gmail.com
References
Muthén, L. K., & Muthén, B. O. (2002). How to use a Monte Carlo study to decide on sample size and determine power. Structural Equation Modeling: A Multidisciplinary Journal, 9(4), 599–620. https://doi.org/10.1207/S15328007SEM0904_8
Robert, C., & Casella, G. (2010). Introducing Monte Carlo methods with R. Springer. https://doi.org/10.1007/978-1-4419-1576-4
Examples
diffpwr.dep(n.samples = 1000, n = 250, r12 = .30, r13 = .45,
r23 = .50, alpha = .05, seed = 1234)