Hi,
I am not sure if this is the appropriate place to ask a question
about JAGS, but it is completely relevant to BUGS.
I am trying to run a CFA in JAGS and I just wanted to verify
that I am running the model properly, syntactically. The model I
am trying to run is available here ...
http://dl.dropbox.com/u/1501309/cfa_model_visual.pdf
And the model is pasted below.
Thanks,
Chris
model {
for(i in 1:N){
##########################
# measurement equation model
##########################
for(j in 1:P){
y[i,j]~dnorm(mu[i,j],psi[j])
}
##########################
# alp[i] corresponds to the intercepts
##########################
mu[i,1]<lam[1]*xi[i,1]+alp[1] ## Ext1
mu[i,2]<lam[2]*xi[i,1]+alp[2]
mu[i,3]<lam[3]*xi[i,1]+alp[3]
mu[i,4]<lam[4]*xi[i,2]+alp[4] ## Soc1
mu[i,5]<lam[5]*xi[i,2]+alp[5]
mu[i,6]<lam[6]*xi[i,2]+alp[6]
mu[i,7]<lam[7]*xi[i,3]+alp[7] ## Aca1
mu[i,8]<lam[8]*xi[i,3]+alp[8]
mu[i,9]<lam[9]*xi[i,3]+alp[9]
mu[i,10]<lam[10]*xi[i,4]+alp[10] ## Ext2
mu[i,11]<lam[11]*xi[i,4]+alp[11]
mu[i,12]<lam[12]*xi[i,4]+alp[12]
mu[i,13]<lam[13]*xi[i,5]+alp[13] ## Soc2
mu[i,14]<lam[14]*xi[i,5]+alp[14]
mu[i,15]<lam[15]*xi[i,5]+alp[15]
mu[i,16]<lam[16]*xi[i,6]+alp[16] ## Aca2
mu[i,17]<lam[17]*xi[i,6]+alp[17]
mu[i,18]<lam[18]*xi[i,6]+alp[18]
mu[i,19]<lam[19]*xi[i,7]+alp[19] ## Work2
mu[i,20]<lam[20]*xi[i,7]+alp[20]
mu[i,21]<lam[21]*xi[i,7]+alp[21]
mu[i,22]<lam[22]*xi[i,8]+alp[22] ## Ext3
mu[i,23]<lam[23]*xi[i,8]+alp[23]
mu[i,24]<lam[24]*xi[i,8]+alp[24]
mu[i,25]<lam[25]*xi[i,9]+alp[25] ## Soc3
mu[i,26]<lam[26]*xi[i,9]+alp[26]
mu[i,27]<lam[27]*xi[i,9]+alp[27]
mu[i,28]<lam[28]*xi[i,10]+alp[28] ## Aca3
mu[i,29]<lam[29]*xi[i,10]+alp[29]
mu[i,30]<lam[30]*xi[i,10]+alp[30]
mu[i,31]<lam[31]*xi[i,11]+alp[31] ## Work3
mu[i,32]<lam[32]*xi[i,11]+alp[32]
mu[i,33]<lam[33]*xi[i,11]+alp[33]
mu[i,34]<lam[34]*xi[i,12]+alp[34] ## Ext4
mu[i,35]<lam[35]*xi[i,12]+alp[35]
mu[i,36]<lam[36]*xi[i,12]+alp[36]
mu[i,37]<lam[37]*xi[i,13]+alp[37] ## Soc4
mu[i,38]<lam[38]*xi[i,13]+alp[38]
mu[i,39]<lam[39]*xi[i,13]+alp[39]
mu[i,40]<lam[40]*xi[i,14]+alp[40] ## Aca4
mu[i,41]<lam[41]*xi[i,14]+alp[41]
mu[i,42]<lam[42]*xi[i,14]+alp[42]
mu[i,43]<lam[43]*xi[i,15]+alp[43] ## Work4
mu[i,44]<lam[44]*xi[i,15]+alp[44]
mu[i,45]<lam[45]*xi[i,15]+alp[45]
xi[i,1:15]~dmnorm(u[1:15],phi[1:15,1:15])
}
for(j in 1:45){alp[j]~dnorm(0.0, 1.0)}
for(j in 1:45){lam[j]~dnorm(0.8,psi[j])}
for(j in 1:P){
psi[j]~dgamma(6, 10) ##
sgm[j]<1/psi[j]
}
psd~dgamma(6, 10)
sgd<1/psd
phi[1:15,1:15]~dwish(R[1:15,1:15], 15)
phx[1:15,1:15]<inverse(phi[1:15,1:15])
}

This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
