[R] rjags dmnorm error

hatty_m h.muncey09 at imperial.ac.uk
Wed May 9 13:25:41 CEST 2012


I am having trouble initializing a bayesian model, with multivariate normal
likelihood.

*model{*

for (i in 1:N) {
	mu1[i]<-(pow(10,(pka1-ph[i]))*da1[2]+da1[1])/(1+pow(10,(pka1-ph[i])))+K[1]
}
for (i in 1:N) {
	mu2[i]<-(pow(10,(pka2-ph[i]))*da2[2]+da2[1])/(1+pow(10,(pka2-ph[i])))+K[2]
}

Y[1:N,1]<-y1
Y[1:N,2]<-y2

MU[1,1:N]<-mu1
MU[2,1:N]<-mu2
Y ~ dmnorm(MU,SIGMA)

SIGMA ~ dwish(R,2)

K[1] ~ dnorm(0,t2[1])
t2[1]<-1/p[1]
p[1] ~ dgamma(2,0.5)
K[2] ~ dnorm(0,t2[2])
t2[2]<-1/p[2]
p[2] ~ dgamma(2,0.5)
pka1 ~ dnorm(A,1)
da1[1] ~ dunif(0,10)
da1[2] ~ dunif(0,10)

pka2 ~ dnorm(A,1)
da2[1] ~ dunif(0,10)
da2[2] ~ dunif(0,10)

A ~ dunif(0,14)
*}*

y1 and y2 are vectors of length N, whilst the matrix R is the N-dim identity
matrix.

When attempting to initialize, I get the following error:

 / RUNTIME ERROR:
Non-conforming parameters in distribution dmnorm/


--
View this message in context: http://r.789695.n4.nabble.com/rjags-dmnorm-error-tp4620137.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list