Print

Print


Dear list members

I am attempting a latent variable analysis of ordered categorical response
data.  My model compiles but when running it falls into the "undefined real
result" trap every few thousand replicates.  The error can be provoked by
the simplified version of my model, with a single covariate and small
contrived data set, that I have included below.  If anyone can tell me what
I'm doing wrong I would be most grateful.

cheers
Michael


model {
  cutpoint[1] ~ dnorm(0, 0.001)I(,cutpoint[2])
  cutpoint[2] ~ dnorm(0, 0.001)I(cutpoint[1],)

  for ( i in 1:N ) {
    mu[i] <- beta * x[i]
    for ( j in 1:(Nclasses-1) ) {
      logit(P[i,j]) <- cutpoint[j] - mu[i]
    }
  }

  beta ~ dnorm(0, 0.001)

  for ( i in 1:N ) {
    p[i,1] <- P[i,1]
    p[i,2] <- P[i,2] - P[i,1]
    p[i,3] <- 1 - P[i,2]

    y[i] ~ dcat(p[i,])
  }
}

#inits
list(cutpoint=c(5,8), beta=1)

#data
list(N=15, Nclasses=3)

y[] x[]
1 16
1 7
1 13
1 9
1 11
2 3
2 2
2 7
2 4
2 1
3 21
3 17
3 14
3 21
3 22
END


---
Michael Bedward
Biodiversity Research & Management
Policy and Science Division
Dept. Environment and Conservation
[log in to unmask]
ph: 61-(0)2-95856493   fax: 61-(0)2-95856606









This message is intended for the addressee named and may contain
confidential information.

If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message may be those of the individual sender, and are not necessarily the views of the NSW Department of Environment and Conservation.

-------------------------------------------------------------------
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