Description Usage Arguments Value Examples
Estimates the power of paired and unpaired t-test in the case of normal data for a given intra-pair correlation, significance level, sample size and effect size.
1 |
npairs |
integer. Supplies the number of pairs to be simulated. Resulting in two samples of size "npairs". |
eff |
numeric. Supplies the difference in means between both groups. Can be interpreted as effect size based on the fact that standard normal variates are the basis of simulation. |
rho |
numeric. Supplies the correlation coefficient between both groups. |
sig |
numeric. Supplies the significance level for the test. 0.05 by default. |
rounds |
integer. Supplies the number of simulation to base the power estimation on. Set to 10000 by default. |
Returns the estimated power for both tests as a vector containing the power of the unpaired t-test in the first place.
1 2 | powertest <- powr(npairs = 10, eff = 0.5, rho = 0.1)
powertest
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.