Print

Print


Thanks to all respondents, I've attached my original e-mail followed by
a synopsis of the replies:

Original message:

> I have a question regarding the role played by the "unstructured"
> heterogeneity variable in both spatial and non-spatial models.  In
> particular, when I fit a model in BUGS that includes ecological
> covariates and the random-effects variable, representing unstructured
> heterogeneity, I get a model that fits the data WORSE than if I fit a
> model to my data that includes ONLY the random-effects term.  I was
> perplexed by this result since in the frequentist analysis I was able
to
> explain 50% of the variability in my data using the ecological
> regression covariates.  In order to further investigate what might be
> occurring I fit the following model in BUGS on a hypothetical data set

> containing 20 observations, 19 of which had a value of 1 and one with
a
> value of 250:
>
> model
> {
>   for (i in 1:N){
>     O[i] ~ dpos(mu[i])
>     log(mu[i])<- alpha + h[i]  # intercept + Unstructured random
effects
>
>     h[i] ~ dnorm(0,tau.h)
> }
>
> #Other priors
> alpha ~ dnorm(0,0.001)
> tau.h ~ dgamma(0.3612,1.29)
>
>
> the results are as follows;
>
> Observed  Expected(from BUGS)
> 1                1.111
> 1                1.11
> 1                1.117
> 1                1.11
> 1                1.126
> 1                1.116
> 1                1.109
> 1                1.104
> 1                1.117
> 250            247.7
> 1                1.119
> 1                1.119
> 1                1.113
> 1                1.118
> 1                1.122
> 1                1.131
> 1                1.112
> 1                1.118
> 1                1.115
> 1                1.106
>
> Amazing fit!  After fitting this model I realized that the random
> effects term was modeling the observed data TOO WELL!  Unfortunately,
> even though I am using the BUGS code in my modeling work in a manner
> that completely copies the spatial model structures presented in the
> BUGS manual, I am still getting these odd results.  Can anyone out
there
> explain to me WHY the unstructured random effects are basically
> reproducing the observed data when I thought its role was to smooth
the
> data towards the global mean?  I'm wondering if I have somehow
> mis-specified the model's structure, or if it has to do with the
Gibb's
> sampler fitting a model to each data point instead of averaging across

> all the data?  I must admit this problem has got me quite confused,
any
> help will be appreciated.
>
> thanks in advance,
> matt


Synopsis of replies:


As noted by David Spiegelhalter:

1)  "It all depends on your prior for tau.  tau near 0 will fit the data
exactly, so that if the prior supports low values of tau, and the data
show a lot of heterogeneity, there will be little shrinkage.  This is a
Bayesian analysis!"

2) Remember, this is a Bayesian analysis and there is no such thing as
the 'correct' distribution!
This can be translated into an appeal for a 'reference' prior for tau,
but sadly none has been accepted.  Some have argued that the  prior
should place a uniform distribution over the shrinkage (Natarajan and
Kass, 2000, JASA), and there have been all sorts of other suggestions.
My personal preference is for a uniform distribution on the sd

sigma~dunif(0,100)
tau<-1/(sigma*sigma)

which seems to let the data have its say, so if the data look very
heterogeneous, there will be little shrinkage.  But there may be
sensitivity to the prior. I hope this is helpful (I've got a book coming
out that goes into all this in detail).

And from Kate Cowles:

"How did you choose your prior on tau.h?  It puts a lot of prior weight
on very small values of tau.h, which would correspond to large values of
the variance of the h[i]'s.  The bigger the variance of the h[i]'s, the
more closely they can fit the data."

Helpful translation from Duncan Goliche:

"...you are usually interested in the posterior distribution of the
parameters of the model as well as the "fit". Which is what David is
saying when he speaks of the support the data provide for high values
for the precision parameter. The expected values for your mu are formed
from melding a very weak model into the data. So either use data which
support each other more, or force a very informative prior on them.  I
think!"

And finally, a very succinct and useful reply from Martyn Plummer:

" The unstructured heterogeneity model lies between two extremes:
1) A common mean model in which all units have the same mean, and
2) A fixed effects model in which observing one unit gives no
information about the mean of another.

The model will adapt towards one or the other extreme depending on the
amount of heterogeneity in the data (and the strength of the prior on
tau.h).  In your case, there is a huge amount of extra-Poisson variation

due to the presence of the outlier, so the fit is close to the
fixed-effects model.

There is no shrinkage towards the common mean because the data suggest
that there isn't one."


I want to thank everyone for their responses (there were several more
that I did not include here), all were very useful in helping to
structure my thinking about HOW this random effect is treated in the
model and WHAT the interpretations of results should be when this source
of variability is included.  I also want to say that I am very
appreciate of the willingness of people who are much more advanced than
myself to take the time to provide me with thoughtful answers and
guidance.

thanks,
matt

*******************************
Matthew Farnsworth
Graduate Research Assistant
Colorado State University
Natural Resources Ecology Lab
Fort Collins,  CO.  80523
970-491-1604
*******************************

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