composites {quest} | R Documentation |
Composite Reliability of Multiple Scores
Description
composites
computes the composite reliability coefficient (sometimes
referred to as omega) for multiple sets of variables/items. The composite
reliability computed in composites
assumes a undimensional factor
model for each set of variables/items with no error covariances. In addition
to the coefficients themselves, their standard errors and confidence
intervals are returned, the average standardized factor loading from the
factor models and number of variables/items in each set, and (optional) model
fit indices of the factor models. Note, any reverse coded items need to be
recoded ahead of time so that all items are keyed in the same direction for
each set of variables/items.
Usage
composites(
data,
vrb.nm.list,
level = 0.95,
std = FALSE,
ci.type = "delta",
boot.ci.type = "bca.simple",
R = 200L,
fit.measures = c("chisq", "df", "tli", "cfi", "rmsea", "srmr"),
se = "standard",
test = "standard",
missing = "fiml",
...
)
Arguments
data |
data.frame of data. |
vrb.nm.list |
list of character vectors containing colnames in
|
level |
double vector of length 1 with a value between 0 and 1 specifying what confidence level to use. |
std |
logical element of length 1 specifying if the composite
reliability should be computed for the standardized version of the
variables/items |
ci.type |
character vector of length 1 specifying which type of confidence interval to compute. The "delta" option uses the delta method to compute a standard error and a symmetrical confidence interval. The "boot" option uses bootstrapping to compute an asymmetrical confidence interval as well as a (pseudo) standard error. |
boot.ci.type |
character vector of length 1 specifying which type of
bootstrapped confidence interval to compute. The options are: 1) "norm", 2)
"basic", 3) "perc", 4) "bca.simple". Only used if |
R |
integer vector of length 1 specifying how many bootstrapped
resamples to compute. Note, as the number of bootstrapped resamples
increases, the computation time will increase. Only used if |
fit.measures |
character vector specifying which model fit indices to
include in the return object. The default option includes the chi-square
test statistic ("chisq"), degrees of freedom ("df"), tucker-lewis index
("tli"), comparative fit index ("cfi"), root mean square error of
approximation ("rmsea"), and standardized root mean residual ("srmr"). If
NULL, then no model fit indices are included in the return object. See
|
se |
character vector of length 1 specifying which type of standard
errors to compute. If ci.type = "boot", then the input value is ignored and
implicitly set to "bootstrap". See |
test |
character vector of length 1 specifying which type of test
statistic to compute. If ci.type = "boot", then the input value is ignored
and implicitly set to "bootstrap". See |
missing |
character vector of length 1 specifying how to handle missing
data. The default is "fiml" for full information maximum likelihood. See
|
... |
other arguments passed to |
Details
The factor models are estimated using the R package lavaan
. The
reliability coefficients are calculated based on the square of the sum of the
factor loadings divided by the sum of the square of the sum of the factors
loadings and the sum of the error variances (Raykov, 2001).
composites
is only able to use the "ML" estimator at the moment and
cannot model items as categorical/ordinal. However, different versions of
standard errors and test statistics are possible. For example, the "MLM"
estimator can be specified by se
= "robust.sem" and test
=
"satorra.bentler"; the "MLR" estimator can be specified by se
=
"robust.huber.white" and test
= "yuan.bentler.mplus". See
lavOptions
and scroll down to Estimation options for
details.
Value
data.frame containing the composite reliability of each set of variables/items.
- est
estimate of the reliability coefficient
- se
standard error of the reliability coefficient
- lwr
lower bound of the confidence interval of the reliability coefficient
- upr
upper bound of the confidence interval of the reliability coefficient
- average_l
average standardized factor loading from the factor model
- nvrb
number of variables/items
- ???
any model fit indices requested by the
fit.measures
argument
References
Raykov, T. (2001). Estimation of congeneric scale reliability using covariance structure analysis with nonlinear constraints. British Journal of Mathematical and Statistical Psychology, 54(2), 315–323.
See Also
Examples
dat0 <- psych::bfi[1:250, ]
dat1 <- str2str::pick(x = dat0, val = c("A1","C4","C5","E1","E2","O2","O5",
"gender","education","age"), not = TRUE, nm = TRUE)
vrb_nm_list <- lapply(X = str2str::sn(c("E","N","C","A","O")), FUN = function(nm) {
str2str::pick(x = names(dat1), val = nm, pat = TRUE)})
composites(data = dat1, vrb.nm.list = vrb_nm_list)
## Not run:
start_time <- Sys.time()
composites(data = dat1, vrb.nm.list = vrb_nm_list, ci.type = "boot",
R = 5000L) # the function is not optimized for speed at the moment
# since it will bootstrap separately for each set of variables/items
end_time <- Sys.time()
print(end_time - start_time) # takes 10 minutes on my laptop
## End(Not run)
composites(data = attitude,
vrb.nm.list = list(names(attitude))) # also works with only one set of variables/items