Hello BUGS users,
I just wanted to let you know that I found the mistake. The values of
the betas are very large (tens of thousands, as they represent cost
differences for health conditions), so precision of 1e-6 (which is std
= 1000) is not un-informative enough. I scaled my data by 1000 and
everything works as expected.
Thanks,
Nicholas
On Mon, Dec 13, 2010 at 2:49 PM, Nicholas Mitsakakis
<[log in to unmask]> wrote:
> Dear BUGS users,
>
> I am trying to fit a linear regression model with four dichotomous factors
> (dummy variables for a 5 level categorical variable), but I am getting
> incomprehensible results. I compared the results with those from a simple
> linear model using lm function in R and the differences are much larger than
> I ever expected. For one of the variables the coefficient from lm is almost
> 20 times larger than the posterior mean from WinBUGS. The chain from WinBUGS
> seems to mix well, no autocorrelation in the posterior densities either.
>
> My (very simple) model is:
>
> model
> {
> for (i in 1:Nlong){
> Y[i] ~ dnorm(mu[i],tau.epsilon)
> mu[i] <- alpha0 + T1[i]*beta10 + T2[i]*beta20 + T3[i]*beta30 +
> T4[i]*beta40
> }
>
> alpha0 ~ dnorm(0.0, 1.0E-6)
> beta10 ~ dnorm(0.0, 1.0E-6)
> beta20 ~ dnorm(0.0, 1.0E-6)
> beta30 ~ dnorm(0.0, 1.0E-6)
> beta40 ~ dnorm(0.0, 1.0E-6)
>
>
> tau.epsilon ~ dgamma(0.01,0.001)
> sigma <- 1/sqrt(tau.epsilon)
> }
>
> Is this difference possible, or it means that I am doing somewhere something
> wrong?
>
> I am looking forward to hearing any input, it will be greatly appreciated.
>
> Thanks,
>
> Nicholas
>
--
Nicholas Mitsakakis, MSc, PhD
Research Associate - Biostatistican
Toronto Health Economics and Technology Assessment (THETA) Collaborative
Leslie L. Dan Pharmacy Building, University of Toronto
6th Floor, Room 658
144 College Street
Toronto ON, M5S 3M2
e: [log in to unmask]
t: (416) 946 - 3700
f: (416) 946 - 3719
w: www.theta.utoronto.ca
-------------------------------------------------------------------
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
|