Skip to content
RDocumentation: short_icc
  • AI Chat
  • Code
  • Report
  • Note that this notebook was automatically generated from an RDocumentation page. It depends on the package and the example code whether this code will run without errors. You may need to edit the code to make things work.

    if(!require('splithalfr')) {
        install.packages('splithalfr')
        library('splithalfr')
    }
    # 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)