plot ICC {NormData}R Documentation

Graphical depiction of the ICC.

Description

The ICC corresponds to the proportion of the total variance in the residuals that is accounted for by the clustering variable at hand (Kutner et al., 2005). This function visualizes the extent ot which there is clustering in the dataset.

Usage

## S3 method for class 'ICC'
plot(x, X.Lab="Cluster", Y.Lab="Test score", 
Main="", Add.Jitter=0.2, Size.Points=1, Size.Labels=1, 
Add.Mean.Per.Cluster=TRUE, Col.Mean.Symbol="red", Seed=123, 
...)

Arguments

x

A fitted object of class ICC.

X.Lab

The label that should be added to the X-axis. X.Lab="Cluster".

Y.Lab

The label that should be added to the Y-axis. Y.Lab="Test score".

Main

The title of the plot. Default Main=" ", i.e., no title.

Add.Jitter

The amount of jitter (random noise) that should be added in the horizontal direction (predicted scores, X-axis) of the plot. Adding a bit of jitter is useful to show the inidividual data points more clearly. The specified value Add.Jitter= in the function call determines the amount of jitter (range of values) that is added. For example, when Add.Jitter=0.2, a random value between -0.2 and 0.2 (sampled from a uniform) is added to the X-axis. Default Add.Jitter=0.2.

Size.Points

The size of the points in the plot. Default Size.Points=1.

Size.Labels

The size of the Labels of the X-axis in the plot. Default Size.Labels=1.

Add.Mean.Per.Cluster

Logical. Should the means per cluster be shown?
Default Add.Mean.Per.Cluster=TRUE.

Col.Mean.Symbol

The color of the symbol that is used to indicate the mean (for each of the clusters). Default Col.Mean.Symbol="red".

Seed

The random seed that is used to add jitter. Default Seed=123.

...

Other arguments to be passed to the plot function.

Value

No return value, called for side effects.

Author(s)

Wim Van der Elst

References

Kutner, M. H., Nachtsheim, C. J., Neter, J., and Li, W. (2005). Applied linear statistical models (5th edition). New York: McGraw Hill.

Van der Elst, W. (2024). Regression-based normative data for psychological assessment: A hands-on approach using R. Springer Nature.

See Also

ICC

Examples

# Compute ICC in Substitution dataset, using Test.Administrator as 
# clustering unit
data(Substitution)

# Add administrator to the dataset (just randomly allocate labels 
# as Test.Administrator, so ICC should be approx. 0)
Substitution$Test.Adminstrator <- NA
Substitution$Test.Adminstrator <- sample(LETTERS[1:10], 
  replace = TRUE, size = length(Substitution$Test.Adminstrator))
Substitution$Test.Adminstrator <- 
  as.factor(Substitution$Test.Adminstrator)

ICC_LDST <- ICC(Cluster = Test.Adminstrator, Test.Score = LDST, Data = Substitution)

# Explore results
summary(ICC_LDST)
plot(ICC_LDST)

# Make points in the plot a bit larger and reduce 
# the size of labels on the X-axis (initials test administrators)
plot(ICC_LDST, Size.Labels = .5, Size.Points=.5)

[Package NormData version 1.1 Index]