# \donttest{
set.seed(20220722)
full.model.pop <-'
y1 ~ 0.4*x
y2 ~ 0.5*x + 0.2*y1
y3 ~ 0.4*x
y4 ~ 0.4*y1 + 0.4*y2 + 0.4*y3
y1 ~~ 0.84*y1
y2 ~~ 0.61*y2
y3 ~~ 0.84*y3
y4 ~~ 0.27*y4
'
full.model <-'
y1 ~ x
y2 ~ x + y1
y3 ~ x
y4 ~ y1 + y2 + y3
'
reduced.model <-'
y1 ~ x
y2 ~ x
y3 ~ x
y4 ~ y1 + y3
'
wp.mc.chisq.diff(full.model.pop, full.model, reduced.model)
# }
Run the code above in your browser using DataLab