Learn R Programming

rmngb (version 0.6-1)

plotICC: Visualization of Intra Class Correlation

Description

Visually represents Intra Class Correlation.

Usage

plotICC(x, ...) "plotICC"(x, subjects, p = FALSE, ptype = 4, ...) "plotICC"(x, p = FALSE, ptype = 4, ...) "plotICC"(x, p = FALSE, ptype = 4, ...)

Arguments

x
vector with the measurement of interest, or matrix with one line per individual and one column per measurement.
subjects
vector with a unique identifiant per subject, not used if x is a matrix.
p
logical. Should points be added for each unique measurement (useful if there is more than 2 measurements per subject)?
ptype
integer. Plotting symbol for the points, corresponds to pch. See points.
...
additional arguments passed to plot.

Value

Details

The range of values measured within a single subject are represented by a vertical line, so there is one line per subject. For lisibility lines are sorted by the means of the measurements.

Examples

Run this code
m1 <- rnorm(300)
subject <- rep(1:100, 3)
plotICC(m1, subject) # poor ICC

m2 <- m1 + subject / 5
plotICC(m2, subject) # better ICC
plotICC(m2, subject, TRUE) # with points

Run the code above in your browser using DataLab