short_icc {splithalfr}R Documentation

Calculate Intraclass Correlation Coefficient (ICC)

Description

Wrapper for ICCs calculated via ICC. If x or y have less than two elements, NA is returned.

Usage

short_icc(
  x,
  y,
  type = c("ICC1", "ICC2", "ICC3", "ICC1k", "ICC2k", "ICC3k"),
  ...
)

Arguments

x

(vector) a numeric vector

y

(vector) a numeric vector with compatible dimensions to x

type

(character) type of ICC to calculate, see ICC

...

Arguments passed to ICC

Value

(numeric) Value of ICC coefficient

See Also

Other splithalfr coefficients: angoff_feldt(), assmd(), flanagan_rulon(), sdregi(), spearman_brown()

Examples

# Generate two variables with different means, variances and a correlation of about 0.5
library(MASS)
vars = mvrnorm(30, mu = c(0, 2), Sigma = matrix(c(5, 2, 2, 3), ncol = 2), empirical = TRUE)
# Calculate ICC1
short_icc(vars[,1], vars[,2], type = "ICC1", lmer = FALSE)

[Package splithalfr version 2.2.2 Index]