mattansb / Structural-Equation-Modeling-foR-Psychologists

Lesson files used in the Structural Equation Modeling for Psychologists.
Other
136 stars 30 forks source link

Omega reliability affected by indicator direction #3

Closed mattansb closed 3 years ago

mattansb commented 4 years ago
library(lavaan)
library(semTools)

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data = HolzingerSwineford1939)

reliability(fit)
#>           visual   textual     speed
#> alpha  0.6261171 0.8827069 0.6884550
#> omega  0.6253180 0.8851754 0.6877600
#> omega2 0.6253180 0.8851754 0.6877600
#> omega3 0.6120052 0.8850608 0.6858417
#> avevar 0.3705589 0.7210163 0.4244883

HolzingerSwineford1939$x1 <- -1 * HolzingerSwineford1939$x1

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fitN <- cfa(HS.model, data = HolzingerSwineford1939)

reliability(fitN)
#>             visual   textual     speed
#> alpha  -0.54666531 0.8827069 0.6884550
#> omega   0.02498404 0.8851754 0.6877600
#> omega2  0.02498404 0.8851754 0.6877600
#> omega3  0.02200703 0.8850608 0.6858417
#> avevar  0.37055894 0.7210163 0.4244883

Created on 2020-10-05 by the reprex package (v0.3.0)

mattansb commented 3 years ago

Even more about alpha: https://doi.org/10.1177%2F2515245920951747