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.

334 12. MONSTERS AND MIXTURESdata=d , start=list(ap=0,an=1,bfp=0,bfn=0,bep=0,ben=0) )precis(m12.12stan)Mean StdDev lower 0.95 upper 0.95ap 1.12 0.15 0.86 1.45an 2.16 0.05 2.08 2.25bfp -0.37 0.32 -1.06 0.28bfn 0.06 0.09 -0.13 0.23bep 0.01 0.09 -0.18 0.18ben 0.03 0.03 -0.02 0.09Overthinking: Zero-inflated Poisson density function. e function dzipois is implemented ina way that guards against some kinds of numerical error. So its code looks confusing—just typedzipois at the R prompt and see. But really all it’s doing is implementing the likelihood formuladefined in the section above. Here’s a more transparent version of the function, in which it’s mucheasier to see the mixture definition:R code12.45dzip

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

Saved successfully!

Ooh no, something went wrong!