compute_ICC: Compute Intraclass Correlation Coefficient (ICC) for Selected...

View source: R/compute_ICC.R

compute_ICCR Documentation

Compute Intraclass Correlation Coefficient (ICC) for Selected Columns

Description

Computes Intraclass Correlation Coefficients (ICC) for a specified set of numeric variables within a data frame using psych::ICC().

This function standardizes column selection and basic validation while delegating all statistical estimation to psych::ICC().

Usage

compute_ICC(data, items, check_numeric = TRUE, lmer = FALSE, ...)

Arguments

data

A data frame containing the ratings or measurements.

items

A character vector specifying column names for which ICC should be calculated (e.g., raters or repeated measurements).

check_numeric

Logical. If TRUE (default), ensures all selected columns are numeric.

lmer

Logical. Passed to psych::ICC(). Default is FALSE.

...

Additional arguments passed to psych::ICC().

Details

The function does not choose or filter specific ICC models. All available ICC types (e.g., ICC1, ICC2, ICC3, single and average) are returned exactly as produced by psych::ICC().

Users are responsible for:

  • Choosing the appropriate ICC model for their study design.

  • Ensuring assumptions (e.g., continuous ratings, independence).

  • Handling missing data appropriately.

Value

An object returned by psych::ICC(), typically a list containing a results table with ICC estimates, F statistics, confidence intervals, and model details.

See Also

ICC


scaledescr documentation built on April 11, 2026, 5:07 p.m.