R/statpsych1.R
size.ci.mean.ps.Rd
Computes the sample size required to estimate a difference in population means with desired confidence interval precision in a paired-samples design. This function requires a planning value for the average of the variances for the two measurements. Set the Pearson correlation planning value to the smallest value within a plausible range for a conservatively large sample size. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.
size.ci.mean.ps(alpha, var, cor, w)
alpha level for 1-alpha confidence
planning value of average variance of the two measurements
planning value of correlation between measurements
desired confidence interval width
Returns the required sample size
size.ci.mean.ps(.05, 265, .8, 10)
#> Sample size
#> 19
# Should return:
# Sample size
# 19