R/internal_consistency.R
reliab_test.Rd
These function compute various measures of internal consistencies for tests or item-scales of questionnaires.
reliab_test(x, scale.items = FALSE, digits = 3, out = c("txt", "viewer", "browser")) split_half(x, digits = 3) cronb(x) difficulty(x) mic(x, cor.method = c("pearson", "spearman", "kendall"))
x | Depending on the function, |
---|---|
scale.items | Logical, if |
digits | Amount of digits for returned values. |
out | Character vector, indicating whether the results should be printed
to console ( |
cor.method | Correlation computation method. May be one of
|
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
.
difficulty()
The item difficulty value for x
.
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.
The absolute value of the item discrimination indices should be
above 0.1. An index between 0.1 and 0.3 is considered as "fair",
while an index above 0.3 (or below -0.3) is "good". Items with
low discrimination indices are often ambiguously worded and
should be examined. Items with negative indices should be
examined to determine why a negative value was obtained (e.g.
reversed answer categories regarding positive and negative poles).
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
.
A value closer to 1 indicates greater internal consistency.
cronb()
The Cronbach's Alpha value for x
. A value closer to 1
indicates greater internal consistency, where usually following
rule of thumb is applied to interprete the results:
α < 0.5 is unacceptable,
0.5 < α < 0.6 is poor,
0.6 < α < 0.7 is questionable,
0.7 < α < 0.8 is acceptable,
and everything > 0.8 is good or excellent.
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.
“Ideally, the average inter-item correlation for a set of
items should be between .20 and .40, suggesting that while the
items are reasonably homogenous, they do contain sufficiently
unique variance so as to not be isomorphic with each other.
When values are lower than .20, then the items may not be
representative of the same content domain. If values are higher than
.40, the items may be only capturing a small bandwidth of the construct.”
(Piedmont 2014)
difficulty()
This function calculates the item difficutly, which should
range between 0.2 and 0.8. Lower values are a signal for
more difficult items, while higher values close to one
are a sign for easier items. The ideal value for item difficulty
is p + (1 - p) / 2
, where p = 1 / max(x)
. In most
cases, the ideal item difficulty lies between 0.5 and 0.8.
Spearman C. 1910. Correlation calculated from faulty data. British Journal of Psychology (3): 271–295. doi: 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–322. doi: 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. doi: 10.1007/978-94-007-0753-5_1493
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)#> term #> 1 do you feel you cope well as caregiver? #> 2 do you find caregiving too demanding? #> 3 does caregiving cause difficulties in your relationship with your friends? #> 4 does caregiving have negative effect on your physical health? #> 5 does caregiving cause difficulties in your relationship with your family? #> 6 does caregiving cause financial difficulties? #> 7 do you feel trapped in your role as caregiver? #> 8 do you feel supported by friends/neighbours? #> 9 do you feel caregiving worthwhile? #> alpha.if.deleted item.discr #> 1 0.539 -0.241 #> 2 0.384 0.329 #> 3 0.339 0.408 #> 4 0.324 0.441 #> 5 0.380 0.357 #> 6 0.366 0.416 #> 7 0.353 0.368 #> 8 0.534 -0.029 #> 9 0.556 -0.112# split-half-reliability split_half(x)#> #> # Internal Consistency #> #> Split-Half Reliability: 0.410 #> Spearman-Brown Adjustment: 0.581# cronbach's alpha cronb(x)#> [1] 0.459369# mean inter-item-correlation mic(x)#> [1] 0.09176831# item difficulty difficulty(x)#> #> # Item Difficulty #> #> difficulty ideal #> do you feel you cope well as caregiver? 0.78 0.62 #> do you find caregiving too demanding? 0.51 0.62 #> does caregiving cause difficulties in your relationship with your friends? 0.41 0.62 #> does caregiving have negative effect on your physical health? 0.44 0.62 #> does caregiving cause difficulties in your relationship with your family? 0.35 0.62 #> does caregiving cause financial difficulties? 0.32 0.62 #> do you feel trapped in your role as caregiver? 0.48 0.62 #> do you feel supported by friends/neighbours? 0.54 0.62 #> do you feel caregiving worthwhile? 0.73 0.62# 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))) } } # }