# NOT RUN {
ex2model<-'
ept ~ start(.4)*hvltt + b*hvltt + start(0)*age + start(0)*edu + start(2)*R
hvltt ~ start(-.35)*age + a*age + c*edu + start(.5)*edu
R ~ start(-.06)*age + start(.2)*edu
R =~ 1*ws + start(.8)*ls + start(.5)*lt
age ~~ start(30)*age
edu ~~ start(8)*edu
age ~~ start(-2.8)*edu
hvltt ~~ start(23)*hvltt
R ~~ start(14)*R
ws ~~ start(3)*ws
ls ~~ start(3)*ls
lt ~~ start(3)*lt
ept ~~ start(3)*ept
'
indirect<-'ind1 := a*b + c*b'
nobs <- seq(100, 2000, by=200)
power.curve(model=ex2model, indirect=indirect, nobs=nobs,
type='boot', parallel='multicore', ncore=60, ci='percent',
boot.type='simple', interactive=F)
# }
Run the code above in your browser using DataLab