Learn R Programming

sjstats (version 0.2.0)

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 = c("pearson", "spearman", "kendall"))

Arguments

data
A matrix as returned by the cor-function, or a data.frame, where correlations will 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.

References

Piedmont RL (2014) Inter-item Correlations. In: Michalos AC (eds) Encyclopedia of Quality of Life and Well-Being Research. Dordrecht: Springer, 3303-3304 \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}10.1007/978-94-007-0753-5_1493http://doi.org/10.1007/978-94-007-0753-5_1493doi:\ifelse{latex}{\out{~}}{ }latex~ 10.1007/978-94-007-0753-5_1493

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
mydat <- data.frame(efc[, c(start:end)])

mic(mydat)

Run the code above in your browser using DataLab