Learn R Programming

ICC (version 2.4.0)

ICCbare: Estimate the Intraclass Correlation Coefficient (ICC)

Description

Estimates the ICC and confidence intervals using the variance components from a one-way ANOVA.

Usage

ICCbare(x, y, data = NULL)

ICCbareF(x, y, data = NULL)

ICCest(x, y, data = NULL, alpha = 0.05, CI.type = c("THD", "Smith"))

Arguments

x

A column name indicating individual or group id in the dataframe data.

y

A column name indicating measurements in the dataframe data.

data

A data.frame containing x and y.

alpha

A numeric specifying the alpha level to use when estimating the confidence interval. Default is 0.05.

CI.type

A character indicating the particular confidence interval to estimate. Can be specified by just the first letter of the name. See Details section for more.

Value

a list:

ICC

the intraclass correlation coefficient

LowerCI

the lower confidence interval limit, where the confidence level is set by alpha

UpperCI

the upper confidence interval limit, where the confidence level is set by alpha

N

the total number of individuals or groups used in the analysis

k

the number of measurements per individual or group. In an unbalanced design, k is always less than the mean number of measurements per individual or group and is calculated using the equation in Lessells and Boag (1987).

varw

the within individual or group variance

vara

the among individual or group variance

Details

ICCbare conducts simple estimation of the ICC that is meant to be as simple as possible and fast for use in Monte Carlo simulations or bootstrapping. If the design is balanced, ICCbare will calculate variance components 'by hand', instead of using the aov function. ICCbare can be used on balanced or unbalanced datasets with NAs.

ICCbareF is similar to ICCbare, however ICCbareF should not be used with unbalanced datasets. ICCbareF is distinguished from ICCbare, in that ICCbare is more flexible and can handle missing values and unbalanced datasets.

If the dependent variable, x, is not a factor, then the function will change it into a factor and produce a warning message.

For ICCest he confidence interval (CI) 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 and 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).

References

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.

Examples

Run this code
# NOT RUN {
data(ChickWeight)
# ICCest
  ICCest(Chick, weight, data = ChickWeight, CI.type = "S")
# }

Run the code above in your browser using DataLab