Sample size for a within-subjects standardized linear contrast of means confidence interval
Source:R/statpsych1.R
size.ci.lc.stdmean.ws.RdComputes 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)
References
Bonett DG (2009). “Estimating standardized linear contrasts of means with desired precision.” Psychological Methods, 14(1), 1–5. ISSN 1939-1463, doi:10.1037/a0014270 .
Bonett DG (2021). Statistical Methods for Psychologists https://dgbonett.sites.ucsc.edu/.
Examples
q <- c(1/3, 1/3, 1/3, -1)
size.ci.lc.stdmean.ws(.05, .5, .7, .4, q)
#> Sample size
#> Unweighted standardizer: 46
#> Single level standardizer: 51
# Should return:
# Sample size
# Unweighted standardizer: 46
# Single level standardizer: 51