Structural Equation Modeling with lavaan in R
Erin Buchanan
Professor
twofactor.model <- 'visual =~ x1 + x2 + x3
speed =~ x7 + x8 + x9'
twofactor.model <- 'visual =~ x1 + x2 + x3
speed =~ x7 + x8 + x9'
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
visual =~
x1 1.000 0.777 0.667
x2 0.690 0.124 5.585 0.000 0.536 0.456
x3 0.985 0.160 6.157 0.000 0.766 0.678
speed =~
x7 1.000 0.622 0.572
x8 1.204 0.170 7.090 0.000 0.749 0.741
x9 1.052 0.147 7.142 0.000 0.654 0.649
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
visual ~~
speed 0.223 0.052 4.290 0.000 0.460 0.460
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
visual ~~
speed 0.223 0.052 4.290 0.000 0.460 0.460
=~
creates latent variables~~
creates covariance between variables~
creates direct prediction between variablesy ~ x
to specify directiontwofactor.model <- 'visual =~ x1 + x2 + x3
speed =~ x7 + x8 + x9
speed ~~ 0*visual'
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
speed ~~
visual 0.000 0.000 0.000
twofactor.model <- 'visual =~ x1 + x2 + x3
speed =~ x7 + x8 + x9
speed~visual'
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
speed ~
visual 0.368 0.083 4.439 0.000 0.460 0.460
Structural Equation Modeling with lavaan in R