Learn R Programming

sjstats (version 0.10.2)

reliab_test: Check internal consistency of a test or questionnaire

Description

These function compute various measures of internal consistencies for tests or item-scales of questionnaires.

Usage

reliab_test(x, scale.items = FALSE, digits = 3)

split_half(x, digits = 3)

cronb(x)

mic(x, cor.method = c("pearson", "spearman", "kendall"))

Arguments

x

Depending on the function, x may be a matrix as returned by the cor-function, or a data frame with items (e.g. from a test or questionnaire).

scale.items

Logical, if TRUE, the data frame's vectors will be scaled. Recommended, when the variables have different measures / scales.

digits

Amount of digits for returned values.

cor.method

Correlation computation method. May be one of "spearman" (default), "pearson" or "kendall". You may use initial letter only.

Value

reliab_test()

A data frame with the corrected item-total correlations (item discrimination, column item.discr) and Cronbach's alpha (if item deleted, column alpha.if.deleted) for each item of the scale, or NULL if data frame had too less columns.

split_half()

A list with two values: the split-half reliability splithalf and the Spearman-Brown corrected split-half reliability spearmanbrown.

cronb()

The Cronbach's Alpha value for x.

mic()

The mean inter-item-correlation value for x.

Details

reliab_test()

This function calculates the item discriminations (corrected item-total correlations for each item of x with the remaining items) and the Cronbach's alpha for each item, if it was deleted from the scale.

split_half()

This function calculates the split-half reliability for items in the data frame x, including the Spearman-Brown adjustment. Splitting is done by selecting odd versus even columns in x.

cronb()

The Cronbach's Alpha value for x.

mic()

This function calculates a mean inter-item-correlation, i.e. a correlation matrix of x will be computed (unless x 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.

References

Spearman C. 1910. Correlation calculated from faulty data. British Journal of Psychology (3): 271<U+2013>295. 10.1111/j.2044-8295.1910.tb00206.x

Brown W. 1910. Some experimental results in the correlation of mental abilities. British Journal of Psychology (3): 296<U+2013>322. 10.1111/j.2044-8295.1910.tb00207.x

Piedmont RL. 2014. Inter-item Correlations. In: Michalos AC (eds) Encyclopedia of Quality of Life and Well-Being Research. Dordrecht: Springer, 3303-3304. 10.1007/978-94-007-0753-5_1493

Examples

Run this code
# NOT RUN {
library(sjlabelled)
# Data from the EUROFAMCARE sample dataset
data(efc)

# retrieve variable and value labels
varlabs <- get_label(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
x <- efc[, c(start:end)]
colnames(x) <- varlabs[c(start:end)]

# reliability tests
reliab_test(x)

# split-half-reliability
split_half(x)

# cronbach's alpha
cronb(x)

# mean inter-item-correlation
mic(x)

# }
# NOT RUN {
library(sjPlot)
sjt.df(reliab_test(x), describe = FALSE, show.cmmn.row = TRUE,
       string.cmmn = sprintf("Cronbach's α=%.2f", cronb(x)))

# Compute PCA on Cope-Index, and perform a
# reliability check on each extracted factor.
factors <- sjt.pca(x)$factor.index
findex <- sort(unique(factors))
library(sjPlot)
for (i in seq_len(length(findex))) {
 rel.df <- subset(x, select = which(factors == findex[i]))
 if (ncol(rel.df) >= 3) {
   sjt.df(reliab_test(rel.df), describe = FALSE, show.cmmn.row = TRUE,
          use.viewer = FALSE, title = "Item-Total-Statistic",
          string.cmmn = sprintf("Scale's overall Cronbach's α=%.2f",
                                cronb(rel.df)))
   }
 }
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab