Computes the sample size required to estimate an intraclass correlation with desired confidence interval precision in applications where an estimated intraclass correlation from a prior study is available. The actual confidence interval width in the planned study will depend on the value of the estimated intraclass correlation in the planned study. An estimated intraclass correlation from a prior study can be used to compute a lower prediction limit for the estimated intraclass correlation in the planned study, which is then used as a planning value in the sample size analysis. The probability that the 1 - alpha1 confidence interval in the planned study will have a width that is less than the desired width is approximately 1 - alpha2 where alpha1 and alpha2 are specified values.
This sample size approach assumes that the population intraclass correlation that was estimated in the prior study is very similar to the population intraclass correlation that will be estimated in the planned study. If an estimated intraclass correlation from a prior study is not available, the researcher must use expert opinion to guess the value of the intraclass correlation that will be observed in the planned study. The size.ci.icc function uses an intraclass correlation planning value that is based on expert opinion regarding the likely value of the intraclass correlation estimate that will be observed in the planned study.
size.ci.icc.prior(alpha1, alpha2, cor0, n0, r, w)Returns the required sample size
alpha level for 1-alpha1 confidence in the planned study
alpha level for the 1-alpha2 prediction interval
estimated correlation in prior study
sample size in prior study
number of measurements (raters, forms)
desired confidence interval width
size.ci.icc.prior(.05, .10, .674, 50, 3, .2)
# Should return:
# Sample size
# 114
Run the code above in your browser using DataLab