library(semTools)
reliability(fit)--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/TpWINJo_CRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
--
Sorry Martin, the realiability function of semTools, only gives alfa, Omega1:3; and AVE, I want CR.
*************************************************Best RegardsJorge Sinval (BS Psych, MS Psych)Double PhD Student in Psychology (FFCLRP-USP & FPCEUP)Mendeley Advisor*************************************************Nanos gigantum humeris insidentes.
On Tue, May 23, 2017 at 7:31 PM, Stephen Martin <hwki...@gmail.com> wrote:
library(semTools)
reliability(fit)
On Monday, May 22, 2017 at 12:03:04 PM UTC-5, Jorge Sinval wrote:Hello!
I would like to know an easy way to calculate the composite reliability (CR) in order to easily produce my reports with Rmarkdown. I know that I can calculate with:l<-inspect(fit,"coef")$lambdav<-diag(inspect(fit,"coef")$theta)#Composite Reliabilitycr<-sum(l)^2/(sum(l)^2+sum(v))But how can I calculate it for all factor with a single function?Thanks!
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/TpWINJo_CRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/TpWINJo_CRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/TpWINJo_CRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
# McDonald1999, Table 6.3, Page 82
McDonald1999 <- c(2.5666, 1.560, 1.487, 1.195, 1.425, 1.560, 2.493, 1.283, 0.845, 1.313, 1.487, 1.283, 2.462, 1.127, 1.313, 1.195, 0.845, 1.127, 2.769, 1.323, 1.425, 1.313, 1.313, 1.323, 3.356)
McDonald1999Cov <- matrix(data=McDonald1999, ncol=5, nrow=5)
McDonald1999Names <- paste0('item', 1:5)
dimnames(McDonald1999Cov) <- list(McDonald1999Names, McDonald1999Names)
McDonald1999Cov
# Unit loading
McDonaldModelLoading <- '
LV =~ 1*item1 + item2 + item3 + item4 + item5
LV ~~ LV
item1 ~~ item1
item2 ~~ item2
item3 ~~ item3
item4 ~~ item4
item5 ~~ item5
' # end model
# Unit variance
McDonaldModelVariance <- '
LV =~ item1 + item2 + item3 + item4 + item5
LV ~~ 1*LV
item1 ~~ item1
item2 ~~ item2
item3 ~~ item3
item4 ~~ item4
item5 ~~ item5
' # end model
# Fit models
fitUnitLoading <- lavaan(model=McDonaldModelLoading, sample.cov=McDonald1999Cov, sample.nobs=215, estimator='ULS')
fitUnitVariance <- lavaan(model=McDonaldModelVariance, sample.cov=McDonald1999Cov, sample.nobs=215, estimator='ULS')
# Extract estimates
c1<-lavInspect(fitUnitLoading,"coef")
l1<-c1$lambda
v1<-diag(c1$theta)
p1<-c1$psi[1,1]
c2<-lavInspect(fitUnitVariance,"coef")
l2<-c2$lambda
v2<-diag(c2$theta)
p2<-c2$psi[1,1]
c3<-lavInspect(fitUnitLoading,"std")
l3<-c3$lambda
v3<-diag(c3$theta)
p3<-c3$psi[1,1]
# Visually inspect estimates
l1;l2;l3
v1;v2;v3
p1;p2;p3
# Compute omega
omega1 <- ((sum(l1)^2)*p1) / (((sum(l1)^2)*p1) + sum(v1))
omega2 <- (sum(l2)^2) / ((sum(l2)^2) + sum(v2))
omega3 <- (sum(l3)^2) / ((sum(l3)^2) + sum(v3)) # not appropriate
# McDonald 1999 page 90 calculates .8189 or .8188
omega1; omega2; omega3
omega1b <- ((sum(l2)^2)*p2) / (((sum(l2)^2)*p2) + sum(v2))
omega1b
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/TpWINJo_CRI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.
--