Learn R Programming

sjmisc (version 1.0.2)

mic: Compute mean inter-item-correlation

Description

This function calculates a mean inter-item-correlation, i.e. a correlation matrix of data will be computed (unless data is already a cor-object) and the mean of the sum of all item's correlation values is returned. Requires either a data frame or a computed cor-object.

Usage

mic(data, corMethod = "pearson")

Arguments

data
A correlation object (see cor-function), or a data frame which correlations should be calculated.
corMethod
Indicates the correlation computation method. May be one of "spearman" (default), "pearson" or "kendall". You may use initial letter only.

Value

  • The value of the computed mean inter-item-correlation.

Examples

Run this code
# -------------------------------
# Data from the EUROFAMCARE sample dataset
# -------------------------------
data(efc)
# recveive first item of COPE-index scale
start <- which(colnames(efc) == "c82cop1")
# recveive last item of COPE-index scale
end <- which(colnames(efc) == "c90cop9")
# create data frame with COPE-index scale
df <- data.frame(efc[, c(start:end)])

mic(df)

Run the code above in your browser using DataLab