# NOT RUN {
if (!exists("ctstantestfit")) example(ctstantestfit)
newm<-ctModel(type='stanct',
n.latent=ctstantestfit$ctstanmodel$n.latent,
n.TDpred=ctstantestfit$ctstanmodel$n.TDpred,
n.TIpred=ctstantestfit$ctstanmodel$n.TIpred,
MANIFESTVAR=matrix(c('merror',0,0,'merror'),2,2),
MANIFESTMEANS=matrix(0,nrow=ctstantestfit$ctstanmodel$n.manifest),
CINT=matrix(c(0,'cint2'),ncol=1),
n.manifest=ctstantestfit$ctstanmodel$n.manifest,
LAMBDA=diag(2))
newdat <- ctstantestdat
newdat <- newdat[newdat[,'id']!=1,]
newfit <- ctStanUpdModel(ctstantestfit, newdat, newm)
# }
Run the code above in your browser using DataLab