11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

210 6. MODEL SELECTION, COMPARISON, AND AVERAGINGNow let’s simulate and add model averaged posterior predictions. Here’s the procedure,and then I’ll show you the code.(1) Compute AICc (or another information criterion) for each model(2) Compute the weight for each model(3) Sample a model, using the each model’s weight as a probability(4) Sample a vector of parameters from the posterior density of the model chosen instep (3)(5) Repeat steps (3) and (4) until you have enough sampled parameter values(6) Use the collection of samples from all models to simulate predictionsTypically the number of models to average over is small. In this example, it it only four.So it makes more sense to sample from the posterior of each model in proportion to eachmodel weight. is ensures that you end up with a collection of sampled parameter values,with samples from each individual model appearing in proportion to model weight. Whena model doesn’t include a parameter, that parameter is implicitly set to the value zero.And this is what sample.qa.posterior can do, once you pass it a list of models insteadof just one model. So to sample according to AICc weight (the default behavior) and thencompute posterior predictions:R code6.28post

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!