I am using a SEM model investigate relationships between parameter values of a separately fitted model and several covariates. These parameters are the endogenous variables and the covariates are the exogenous variables.
I have experimented with various values of adapt. sample, and burin.
The model includes four groups with equality constraints on some of the path coefficients (see below).
Now I wanted to ask, whether there are ways that I can improve the estimation in blavaan. Note that I set target = "jags" when I fit it in blavaan, because the sampling terminates in error when I set the target to "stan". I have tried to update the packages on the server - but so far with no avail. So, my question concerns optimization of estimation of the model with jags.
m0e_3g <- '
#Regressions
C_i ~ c(p1.d,p1.u,
p1.de,p1.a)*P + c(e1.d,e1.u,
e1.de,e1.a)*E + c(gg1.d,gg1.u,
gg1.de,gg1.a)*GG + c(iwah1.d,iwah1.u,
iwah1.de,iwah1.a)*IWAC + c(egop1.d,egop1.u,
egop1.de,egop1.a)*EgoP + c(egor1.d,egor1.u,
egor1.de,egor1.a)*EgoR + c(egom1.d,egom1.u,
egom1.de,egom1.a)*EgoM
C_s ~ c(p2.d,p2.u,
p2.de,p2.a)*P + c(e2.d,e2.u,
e2.de,e2.a)*E + c(gg2.d,gg2.u,
gg2.de,gg2.a)*GG + c(iwah2.d,iwah2.u,
iwah2.de,iwah2.a)*IWAC + c(egop2.d,egop2.u,
egop2.de,egop2.a)*EgoP + c(egor2.d,egor2.u,
egor2.de,egor2.a)*EgoR + c(egom2.d,egom2.u,
egom2.de,egom2.a)*EgoM
N_i ~ c(p3.d,p3.u,
p3.de,p3.a)*P + c(e3.d,e3.u,
e3.de,e3.a)*E + c(gg3.d,gg3.u,
gg3.de,gg3.a)*GG + c(iwah3.d,iwah3.u,
iwah3.de,iwah3.a)*IWAC + c(egop3.d,egop3.u,
egop3.de,egop3.a)*EgoP + c(egor3.d,egor3.u,
egor3.de,egor3.a)*EgoR + c(egom3.d,egom3.u,
egom3.de,egom3.a)*EgoM
N_s ~ c(p4.d,p4.u,
p4.de,p4.a)*P + c(e4.d,e4.u,
e4.de,e4.a)*E + c(gg4.d,gg4.u,
gg4.de,gg4.a)*GG + c(iwah4.d,iwah4.u,
iwah4.de,iwah4.a)*IWAC + c(egop4.d,egop4.u,
egop4.de,egop4.a)*EgoP + c(egor4.d,egor4.u,
egor4.de,egor4.a)*EgoR + c(egom4.d,egom4.u,
egom4.de,egom4.a)*EgoM
Con ~ c(p5.d,p5.u,
p5.de,p5.a)*P + c(e5.d,e5.u,
e5.de,e5.a)*E + c(gg5.d,gg5.u,
gg5.de,gg5.a)*GG + c(iwah5.d,iwah5.u,
iwah5.de,iwah5.a)*IWAC + c(egop5.d,egop5.u,
egop5.de,egop5.a)*EgoP + c(egor5.d,egor5.u,
egor5.de,egor5.a)*EgoR + c(egom5.d,egom5.u,
egom5.de,egom5.a)*EgoM
Res ~ c(p6.d,p6.u,
p6.de,p6.a)*P + c(e6.d,e6.u,
e6.de,e6.a)*E + c(gg6.d,gg6.u,
gg6.de,gg6.a)*GG + c(iwah6.d,iwah6.u,
iwah6.de,iwah6.a)*IWAC + c(egop6.d,egop6.u,
egop6.de,egop6.a)*EgoP + c(egor6.d,egor6.u,
egor6.de,egor6.a)*EgoR + c(egom6.d,egom6.u,
egom6.de,egom6.a)*EgoM
I ~ c(p7.d,p7.u,
p7.de,p7.a)*P + c(e7.d,e7.u,
e7.de,e7.a)*E + c(gg7.d,gg7.u,
gg7.de,gg7.a)*GG + c(iwah7.d,iwah7.u,
iwah7.de,iwah7.a)*IWAC + c(egop7.d,egop7.u,
egop7.de,egop7.a)*EgoP + c(egor7.d,egor7.u,
egor7.de,egor7.a)*EgoR + c(egom7.d,egom7.u,
egom7.de,egom7.a)*EgoM
################
#equality constraints#
################
#doctrine of double effect is like deontology for intended means; like utilitarianism for side-effect
p1.de == p1.d
p2.de == p2.u
p3.de == p3.d
p4.de == p4.u
e1.de == e1.d
e2.de == e2.u
e3.de == e3.d
e4.de == e4.u
gg1.de == gg1.d
gg2.de == gg2.u
gg3.de == gg3.d
gg4.de == gg4.u
iwah1.de == iwah1.d
iwah2.de == iwah2.u
iwah3.de == iwah3.d
iwah4.de == iwah4.u
egop1.de == egop1.d
egop2.de == egop2.u
egop3.de == egop3.d
egop4.de == egop4.u
egor1.de == egor1.d
egor2.de == egor2.u
egor3.de == egor3.d
egor4.de == egor4.u
egom1.de == egom1.d
egom2.de == egom2.u
egom3.de == egom3.d
egom4.de == egom4.u
'
m0e_3g_model <- sem(m0e_3g, df_class, group ="Classification")