size.test.mean.ps | R Documentation |
Computes the sample size required to test a difference in population means with desired power in a paired-samples design. Set the Pearson correlation planning value to the smallest value within a plausible range, and set the variance planning value to the largest value within a plausible range for a conservatively large sample size.
size.test.mean.ps(alpha, pow, var, es, cor)
alpha |
alpha level for hypothesis test |
pow |
desired power |
var |
planning value of average variance of the two measurements |
es |
planning value of mean difference |
cor |
planning value of correlation |
Returns the required sample size
size.test.mean.ps(.05, .80, 1.25, .5, .75)
# Should return:
# Sample size
# 22
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.