Sorry if this is not the place to post this question.
I am trying to implement in R the consistent reliability coefficient rho_A proposed in "Consistent Partial Least Squares Path Modeling" by Dijkstra and Henseler (equation 3). For that I am using the semPLS package as a starting point.
I have built the following function to calculate rho_A for a given LV:
rho_a <- function(w, S) {
ww <- w %*% t(w)
numer <- t(w) %*% (S-diag(S)) %*% w
denom <- t(w) %*% (ww-diag(ww)) %*% w
rho <- (t(w) %*% w)^2 * numer / denom
return(rho)
}
where w is the vector containing the estimated weights for the LV, and S is the empirical covariance matrix of the LV's indicators.
Using semPLS, I calculate w and S as it follows:
w <- my.pls$outer_weights[1:3,1]
(here I assume the LV of interest correspond to the first column in the outer_weights matrix, and its indicators are in the first three rows)
data <- scale(data)
S <- cov(data[,1:3])
(here data contains all the observations and its three first columns correspond to the LV's indicators; scale() standardizes the data)
Unfortunately, when I run this code I obtain strange values, much bigger than 1.
Am I doing something wrong in my calculation of rho_A? In the calculation of w or S? Thanks for your help!
Cheers,
Nicholas