gicc: Generalized intraclass correlation coefficient for multilevel...

Description Usage Arguments Value Author(s) Examples

View source: R/gicc.R

Description

gicc facilitates the identification of between-subject variables versus balanced within-subject variables with hierarchical data. Methods handle factors, character variables and numerical variables. For categorical variables, Goodman-Kruskal's tau is returned and for numerical variables, the simple ICC with (variance between) / (variance between + variance within) applied to the rank (by default) of the variable. In either case, a value of 1 signifies a variable that is constant within clusters and a value of 0, a variable that is perfectly balanced within clusters.

Usage

1
gicc(x, by, method = 'rank', ...)

Arguments

x

a data frame, factor, character variable or a numerical variable

by

if x is a data frame, by can be a formula (e.g. ~id) evaluated in x. Otherwise, by is a variable defining clusters.

method

a character string indicating whether to work with the rank of the raw variable, x, stripped of missing values, with the raw variable itself, or with is.na(x). Can be one of "rank", raw" or "na".

...

– not used

Value

a measure of relative variability within clusters so that 1 represents no variability and 0 perfect balance.

Author(s)

G. Monette <georges@yorku.ca>

Examples

1
2
  gicc( hs, ~ school)
  gicc( hs, ~ school, method = 'raw')

gmonette/spida documentation built on May 17, 2019, 7:25 a.m.