Print

Print


Using the 'line' example as a a context, I recently asked whether there
was a way to weight GLMs by sample sizes.  David Spiegelhalter kindly
suggested that the precisions be made to incorporate the weight
information, such that:

y[i] ~ dnorm(mu[i], tau.y[i])  #Note: precision names must be changed 
tau.y[i] <- weight[i]*tau      #slightly to allow compilation

A brief analysis shows that this indeed does seem to solve the problem. 
The point estimates appear below (he BUGS runs follow the oft-used 1000
burn-in, 5000 iterations format).  
 
Case I: unweighted line data
              BUGS          SPSS
intercept     .5968         .6000
slope         .7952         .8

Case II: weighted line data - each data point weighted to have an
effective N of 1000
              BUGS          SPSS
intercept     .5968         .6000
slope         .7952         .8

Case III: weighted line data - first data point weighted to have an
effective N of 10, remaining weighted to have an effective N of 1000
              BUGS          SPSS
intercept     1.367         1.380
slope         .6045         .605


The dispersion estimates were generally comparable as well.  Many thanks
to David!

Best,
-Gene Hahn
George Washington University


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%