11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

208 6. MODEL SELECTION, COMPARISON, AND AVERAGINGam6.14m6.13m6.12m6.11log.sigmam6.14m6.13m6.12m6.11bnm6.14m6.13m6.12m6.11bmm6.14m6.13m6.12m6.11FIGURE 6.9. Comparing the posteriordensities of parameters for the fourmodels fit to the primate milk data.Each point is a MAP estimate, and eachblack line segment is a 95% confidenceinterval. Estimates are grouped by parameteridentity, and each row in agroup is a model.-2 -1 0 1 2 3 4EstimateR code6.26a 0.66 0.35 0.71 -1.09log.sigma -1.79 -1.80 -1.85 -2.16bn NA 0.45 NA 2.79bm NA NA -0.03 -0.10nobs 17 17 17 17e nobs at the bottom are the number of observations, just there to help you make sureyou fit each model to the same observations. From scanning the table, you can see that theestimates for both bn and bm get farther from zero when they are both present in the model.But standard errors aren’t represented here, and seeing how the uncertainty changes is just asimportant as seeing how the location changes. You can get coeftab to add standard errorsto the table (see ?coeftab), but that still doesn’t make it easy to appreciate changes in thewidth of posterior densities. Better to plot these estimates:plot( coeftab(m6.11,m6.12,m6.13,m6.14) )e result is shown in FIGURE 6.9. Each point is a MAP estimate, and each black line segmentis a 95% confidence interval. Each group of estimates correspond to the same namedparameter, across models. Each row in each group is a model, labeled on the le. Now youcan quickly scan each group of estimates to see how estimates change or not across models.You can adjust these plots to group by model instead of by parameter and to display onlysome parameters. See ?coeftab.plot for details.Rethinking: Barplots suck. e plot in FIGURE 6.9 is called a DOTCHART. It is a replacement for atypical BARPLOT. e only problem with barplots is that they have bars. e bars carry only a little

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

Saved successfully!

Ooh no, something went wrong!