Hi,
I have been struggling very long with a tiny detail in compRelSEM function (and previously in reliability/reliabilityL2 functions), which has big consequences on the easiness of analytical workflow. Therefore, I have a request for a brief but serious improvement.
If any CFA model is fitted, reverse-coded items are not any problem; they just have negative factor loadings (and "reversed" intercepts/thresholds, which does not impact reliability estimates).
However, when estimating reliability using compRelSEM, each item has a "weight" 1 (thus, there is a simple sum of factor loadings and residual variances in the equation). However, if reverse-coded items are present, this approach obviously lead to meaningless results.
My suggestion is adding a "key" parameter providing manual item weights (default value would be vector of repeated "1"), which could be +1 and -1, or even 0(!) or any other value if reliability of weigted item sum is desired. Then, each row in lambda matrix should be multiplied by this weights, i.e.
lambda <- lambda * keys
theta matrix should by multiplied by the keying cross-product, i.e.
theta <- theta* t(t(keys)) %*% t(keys)
and finaly the total score with obs.var = TRUE should be the weighted sum (I could forget something; not sure about Green-Yang ordinal correction).
This would be very helpful as recently, I have to fit a new model with reverse-coded items to obtain reliability.
This improvement could also serve for excluding variables from the reliability estimation, or weightening, if number of points per item differ (which is not a problem for estimating omega with continuous items, but is a serious problem in ordinal CFA now).
What do you think about that?