Print

Print


Hello
I am working with raw data that has following stats:

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
      legmar |        83    18699.28    29427.66        145     181855
     per9196 |        83    2609.518    9141.757          0      69000
     lonefem |        83    1386.687    2436.079         20      16715

When I use these variables as covarites in univariate models and try to
find the beta parameter associated with each in the model the Trap
message "Undefined real result" comes up. I have tried what I could from
the suggestion in the manual to correct this error, but to no avail. The
model runs when the code does not include the beta value but just the
covarite by itself. My code is below for further consideration.

I think the parameterisation and prior distribution are the main concern
here. Is there another distribution for the prior which would work better
for the beta values of variables with such large variances?

Recently few e-mails were about the missing data problem. I noticed that
the Rats example has missing data as observations and not for covariates.

Would using 'NA' for missing data in covarite vectors also work in WINBUGS?


Thanks

Ayaz

model;
{

 #poisson regression model

 for (i in 1:N) {

  gag1_inj[i] ~ dpois(lambda[i])

  #Model rate as a linear function of covariates
  log(lambda[i])<- log(gag1_pop[i])+E[i]+beta[1]*(x[i]-mean(x
[]))+S[i]+alpha

  #Rate per 1,000 persons.
  R[i]<-(lambda[i]/gag1_pop[i])*1000;

  E[i]~dnorm(0,tau.E)
 }

 S[1:N] ~ car.normal(adj[],weights[],num[],tau.S)
 for(k in 1:sumNumNeigh){
  weights[k]<- 1
  }

 beta[1]~dnorm(0,1.0E-6)
 alpha~dflat()
 tau.E~dgamma(0.0001,0.0001)
 var.E<-1/tau.E
 tau.S~dgamma(0.0001,0.0001)
 var.S<-1/tau.S


}
#Sorry but the data for spatial terms in data file below can't be provided
due to liscencing issues.

list(N=83,sumNumNeigh=370,
gag1_pop=c(20857, 31224, 9041, 9848, 13933, 3810, 28129, 15244, 5545,
24989, 9081, 4279, 15606, 38421, 4468, 5273, 10221, 11390, 31887, 11397,
62950, 144817, 114602, 18196, 7140, 38953, 36020, 6931, 9353, 15844, 10410,
83150, 136190, 134943, 393605, 120576, 157757, 852802, 38597, 164424,
94422, 207350, 131805, 41641, 28660, 22941, 30835, 5030, 7635, 1434, 28498,
9499, 26585, 11590, 26766, 142078, 42791, 42952, 177254, 65893, 55909,
12105, 60744, 7845, 17636, 98859, 32394, 41568, 65535, 49914, 48539, 8384,
11290, 8343, 18903, 9707, 2949, 5554, 23305, 2198, 33725, 3356, 1016),

gag1_inj=c(227, 266, 93, 100, 165, 49, 219, 155, 82, 217, 93, 31, 193, 327,
37, 50, 77, 73, 306, 96, 454, 778, 777, 167, 53, 407, 313, 112, 104, 156,
129, 643, 900, 847, 1954, 598, 595, 1870, 213, 683, 653, 1022, 712, 243,
227, 156, 322, 72, 49, 16, 264, 106, 320, 132, 351, 1197, 415, 371, 1312,
496, 457, 110, 465, 51, 186, 672, 187, 408, 515, 447, 453, 89, 81, 118,
176, 127, 55, 52, 326, 10, 305, 30, 9),

x=c(6695, 10390, 3950, 3705, 5845, 1495, 9565, 5885, 2130, 9200, 4015,
1560, 9045, 17175, 2125, 2270, 2965, 3635, 14160, 4255, 24100, 61075,
40415, 6800, 2035, 10610, 10305, 1460, 2835, 4335, 3325, 28660, 47795,
46185, 141640, 44810, 67730, 181855,17280, 72410, 29980, 73770, 52315,
22685, 11020, 8635, 8910, 1090, 1940, 405, 6480, 1670, 6870, 2975, 6645,
38700, 11120, 10785, 74230, 22185, 29480, 6120, 21965, 2560, 7165, 35590,
18250, 12895, 24060, 16035, 14205, 2585, 5585, 3075, 5255, 2030, 535, 1460,
5460, 375, 8410, 665, 145))

list(tau.E=1,tau.S=1, alpha=0,beta=c(0),
S=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),

E=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))

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