| size.ci.lc.stdmean.ws | R Documentation |
Computes the sample size required to estimate two types of standardized linear contrasts of population means (unweighted standardizer and single level standardizer) with desired confidence interval precision in a within-subjects design. For a conservatively large sample size, set the standardized linear contrast of means planning value to the largest value within a plausible range, and set the Pearson correlation planning value to the smallest value within a plausible range.
For more details, see Section 4.26 of Bonett (2021, Volume 1)
size.ci.lc.stdmean.ws(alpha, d, cor, w, q)
alpha |
alpha level for 1-alpha confidence |
d |
planning value of standardized linear contrast |
cor |
planning value of average correlation between measurements |
w |
desired confidence interval width |
q |
vector of within-subjects contrast coefficients |
Returns the required sample size for each standardizer
Bonett2009statpsych
\insertRefBonett2021statpsych
q <- c(1/3, 1/3, 1/3, -1)
size.ci.lc.stdmean.ws(.05, .5, .7, .4, q)
# Should return:
# Sample size
# Unweighted standardizer: 46
# Single level standardizer: 51
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.