Estimates the ICC and confidence intervals using the variance components from a one-way ANOVA.
ICCest(x, y, data = NULL, alpha = 0.05, CI.type = c("THD", "Smith"))
column name indicating individual or group id in the dataframe data
column name indicating measurements in the dataframe data
a dataframe containing x
and y
the alpha level to use when estimating the confidence interval. Default is 0.05.
the particular confidence interval to estimate. Can be specified by just the first letter of the name. See Details section for more.
the intraclass correlation coefficient
the lower confidence interval limit, where the confidence level is set by alpha
the upper confidence interval limit, where the confidence level is set by alpha
the total number of individuals or groups used in the analysis
the number of measurements per individual or group. In an unbalanced design, k is always less than the mean number of measurements per individual/group and is calculated using the equation in Lessells and Boag (1987).
the within individual or group variance
the among individual or group variance
If the dependent variable, x
, is not a factor, then the function will change it into a factor and produce a warning message.
The confidence interval can be estimated from one of two methods included here. CIs of the type "THD"
are based upon the exact confidence limit equation in Searle (1971) and can be used for unbalanced data (see Thomas & Hultquist 1978; Donner 1979).
CIs of the type "Smith"
are based upon the approximate formulas for the standard error of the ICC estimate (Smith 1956).
C.M. Lessells and P.T. Boag. 1987. The Auk, 104(1):116-121. Searle, S.R. 1971. Linear Models. New York: Wiley. Thomas, J.D. and Hultquist, R.A. 1978. Annals of Statistics, 6:582-587. Donner, A. 1979. American Journal of Epidemiology, 110:335-342. Smith, C.A.B. 1956. Annals of Human Genetics, 21:363-373.
# NOT RUN {
data(ChickWeight)
ICCest(Chick, weight, data = ChickWeight, CI.type = "S")
# }
Run the code above in your browser using DataLab