
Sample size calculation for testing if mean changes for 2 groups are the same or not for longitudinal study with 2 time point.
ssLong(es,
rho = 0.5,
alpha = 0.05,
power = 0.8)
effect size of the difference of mean change.
correlation coefficient between baseline and follow-up values within a treatment group.
Type I error rate.
power for testing for difference of mean changes.
required sample size per group
The sample size formula is based on Equation 8.30 on page 335 of Rosner (2006).
We wish to test
When
Rosner, B. Fundamentals of Biostatistics. Sixth edition. Thomson Brooks/Cole. 2006.
# NOT RUN {
# Example 8.33 on page 336 of Rosner (2006)
# n=85
ssLong(es=5/15, rho=0.7, alpha=0.05, power=0.8)
# }
Run the code above in your browser using DataLab