Learn R Programming

sjmisc (version 1.2)

mic: 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 matrix as returned by the cor-function) 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, cor.method = "pearson")

Arguments

data
A matrix as returned by the cor-function, or a data frame which correlations should be calculated.
cor.method
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