# NOT RUN {
HS.model <- '
visual =~ x1 + b1*x2 + x3
textual =~ x4 + b2*x5 + x6
speed =~ x7 + b3*x8 + x9
b1 == b2
b2 == b3
'
fit <- cfa(HS.model, data=HolzingerSwineford1939)
# test 1: release both two equality constraints
lavTestScore(fit, cumulative = TRUE)
# test 2: the score test for adding two (currently fixed
# to zero) cross-loadings
newpar = '
visual =~ x9
textual =~ x3
'
lavTestScore(fit, add = newpar)
# }
Run the code above in your browser using DataLab