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.

11.2. POISSON 299model m2averagedTotal.Tools20 30 40 50 60 70Total.Tools20 30 40 50 60 707 8 9 10 11 127 8 9 10 11 12log.poplog.popFIGURE 11.10. Predicted tool counts, with low contact rate predictionsshown by open black points and high contact rate shown by filled bluepoints. e actual island data is shown by the larger points. On the le,predictions for only model m10.10 show a clear separation between highand low contact rate islands. On the right, the model averaged predictionsare less confident about the importance of contact rate, and little separationappears between the filled and open points.Since the mean of the Poisson distribution is just λ, then to compute the mean, you onlyneed to exponentiate the linear model. When there is log-link, the inverse is exponential.Plotting these computations with the usual lines commands, the result is shown inFIGURE 11.9. e filled points are islands with high contact rate, while the empty points areislands with low contact rate. e black lines show predictions for low-contact islands, whilethe black lines show predictions for the high contact islands. While the trend with increasingpopulation size is quite strong, there is a lot of overlap between the high and low contact ratepredictions. So while model comparison supports using contact rate to improve prediction,it isn’t half as important as log-population size.Now for simulating predictions from the model. e function you want now is rpois,which produces random Poisson-distributed values. We’ll embed this function in sapply,just as you embedded rnorm in earlier chapters. Here’s the code to produce 500 randompredictions for both low and high contact rate islands:npts

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

Saved successfully!

Ooh no, something went wrong!