Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Statistical Rethinking - Lecture 14

Statistical Rethinking - Lecture 14

Lecture 14 - Binomial and Poisson GLMs - Statistical Rethinking: A Bayesian Course with R Examples

Richard McElreath

February 20, 2015
Tweet

More Decks by Richard McElreath

Other Decks in Education

Transcript

  1. Model comparison + ʡ )*-(ǿǍǢǎǍȀ Ǣ + ʡ )*-(ǿǍǢǎǍȀ Ȁ

    Ǣ /ʙ Ȁ "OE UP DPNQBSF UIF UISFF NPEFMT VTF UIF *(+- GVODUJPO JOUSPEVDFE JO $IBQUFS  3 DPEF  *(+- ǿ (ǎǍǡǎ Ǣ (ǎǍǡǏ Ǣ (ǎǍǡǐ Ȁ   +    2 $"#/   (ǎǍǡǏ ǓǕǍǡǓ Ǐ ǍǡǍ ǍǡǔǍ ǖǡǐǍ  (ǎǍǡǐ ǓǕǏǡǑ ǐ ǎǡǕ ǍǡǏǕ ǖǡǐǑ ǍǡǕǎ (ǎǍǡǎ ǓǕǕǡǍ ǎ ǔǡǑ ǍǡǍǏ ǔǡǎǐ ǓǡǎǑ ćF NPEFM UIBU JODMVEFT *)$/$*) EPFTOU EP CFTU CVU EPFT HFU NPSF UIBO  PG UIF 8"*$ XFJHIU :PV DBO BMTP QMPU UIF *(+- SFTVMUT XIJDI MPPL MJLF UIJT m10.1 m10.3 m10.2 675 680 685 690 695 deviance WAIC /PUJDF UIBU FWFO UIPVHI (ǎǍǡǏ JTOU IVHFMZ CFUUFS UIBO (ǎǍǡǐ UIF EJČFSFODF IBT B TNBMM TUBOEBSE FSSPS &WFO EPVCMJOH UIF TUBOEBSE FSSPS UP HFU B  JOUFSWBM UIF PSEFS PG UIF UXP NPEFMT XPVME OPU DIBOHF 4P PO UIF CBTJT PG JOGPSNBUJPO DSJUFSJB FWFO UIPVHI NPEFM (ǎǍǡǐ PG DPVSTF ĕUT UIF TBNQMF CFUUFS UIBO NPEFM (ǎǍǡǏ CFDBVTF JU IBT NPSF QBSBNFUFST JU EPFT OPU ĕU TVďDJFOUMZ CFUUFS UP PWFSDPNF UIF FYQFDUFE PWFSĕUUJOH /ʙ Ȁ "OE UP DPNQBSF UIF UISFF NPEFMT VTF UIF *(+- GVODUJPO JOUSPEVDFE JO $IBQUFS  *(+- ǿ (ǎǍǡǎ Ǣ (ǎǍǡǏ Ǣ (ǎǍǡǐ Ȁ   +    2 $"#/   (ǎǍǡǏ ǓǕǍǡǓ Ǐ ǍǡǍ ǍǡǔǍ ǖǡǐǍ  (ǎǍǡǐ ǓǕǏǡǑ ǐ ǎǡǕ ǍǡǏǕ ǖǡǐǑ ǍǡǕǎ (ǎǍǡǎ ǓǕǕǡǍ ǎ ǔǡǑ ǍǡǍǏ ǔǡǎǐ ǓǡǎǑ ćF NPEFM UIBU JODMVEFT *)$/$*) EPFTOU EP CFTU CVU EPFT HFU NPSF UIBO  PG UIF 8"*$ XFJHIU :PV DBO BMTP QMPU UIF *(+- SFTVMUT XIJDI MPPL MJLF UIJT m10.1 m10.3 m10.2 675 680 685 690 695 deviance WAIC /PUJDF UIBU FWFO UIPVHI (ǎǍǡǏ JTOU IVHFMZ CFUUFS UIBO (ǎǍǡǐ UIF EJČFSFODF IBT B TNBMM TUBOEBSE FSSPS &WFO EPVCMJOH UIF TUBOEBSE FSSPS UP HFU B  JOUFSWBM UIF PSEFS PG UIF UXP NPEFMT XPVME OPU DIBOHF 4P PO UIF CBTJT PG JOGPSNBUJPO DSJUFSJB FWFO UIPVHI NPEFM (ǎǍǡǐ PG DPVSTF ĕUT UIF TBNQMF CFUUFS UIBO NPEFM (ǎǍǡǏ CFDBVTF JU IBT NPSF QBSBNFUFST JU EPFT
  2. Model comparison /PUJDF UIBU FWFO UIPVHI (ǎǍǡǏ JTOU IVHFMZ CFUUFS

    UIBO (ǎǍǡǐ UIF EJČFSFODF IBT B TNBMM TUBOEBSE FSSPS &WFO EPVCMJOH UIF TUBOEBSE FSSPS UP HFU B  JOUFSWBM UIF PSEFS PG UIF UXP NPEFMT XPVME OPU DIBOHF 4P PO UIF CBTJT PG JOGPSNBUJPO DSJUFSJB FWFO UIPVHI NPEFM (ǎǍǡǐ PG DPVSTF ĕUT UIF TBNQMF CFUUFS UIBO NPEFM (ǎǍǡǏ CFDBVTF JU IBT NPSF QBSBNFUFST JU EPFT OPU ĕU TVďDJFOUMZ CFUUFS UP PWFSDPNF UIF FYQFDUFE PWFSĕUUJOH /PX MFUT MPPL BU UIF FTUJNBUFT GPS (ǎǍǡǐ 3 DPEF  +- $.ǿ(ǎǍǡǐȀ  ) / 1 Ǐǡǒʉ ǖǔǡǒʉ  ǍǡǍǒ Ǎǡǎǐ ǶǍǡǏǍ ǍǡǏǖ + ǍǡǓǎ ǍǡǏǐ Ǎǡǎǔ ǎǡǍǒ Mean StdDev 2.5% 97.5% a 0.05 0.13 -0.20 0.29 bp 0.61 0.23 0.17 1.05 bpC -0.10 0.26 -0.62 0.41 bpC bp a -0.5 0.0 0.5 1.0 Value '$--4ǿ- /#$)&$)"Ȁ /ǿ#$(+)5 .Ȁ  ʚǶ #$(+)5 . 5BLF B MPPL BU UIF CVJMUJO IFMQ Ǩ#$(+)5 . GPS EFUBJMT PO BMM 8FSF HPJOH UP GPDVT PO +0'' Ǿ' !/ BT UIF PVUDPNF UP QSFEJDU *)$/$*) BT QSFEJDUPS WBSJBCMFT ćF PVUDPNF +0'' Ǿ' !/ JT B GPDBM BOJNBM QVMMFE UIF MFęIBOE MFWFS ćF QSFEJDUPS +-*.*Ǿ' UIF MFęIBOE MFWFS XBT  PS XBT OPU  BUUBDIFE UP UIF QSPTPDJBM QJFDFT PG GPPE ćF *)$/$*) QSFEJDUPS JT BOPUIFS  JOEJDBUPS X DPOEJUJPO BOE WBMVF  GPS UIF DPOUSPM DPOEJUJPO /PX XFSF SFBEZ UP ĕU B NPEFM ćF NPEFM JNQMJFE CZ UIF SFTFB FNBUJDBM GPSN ĕSTU -J ∼ #JOPNJBM(, QJ) MPHJU(QJ) = α + (β1 + β1$ $J)1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) )FSF - JOEJDBUFT +0'' Ǿ' !/ 1 JOEJDBUFT +-*.*Ǿ' !/ BOE $ J USJDLZ QBSU PG UIF NPEFM BCPWF JT UIF MJOFBS NPEFM GPS MPHJU(QJ) *U JT XIJDI UIF BTTPDJBUJPO CFUXFFO 1J BOE UIF MPHPEET UIBU -J =  EF $J  #VU OPUF UIBU UIFSF JT OP NBJO FČFDU PG $J JUTFMG OP QMBJO CFUB
  3. Relative and absolute effects • Parameters on relative effect scale,

    ignore base rate • Predictions on absolute effect scale, account for base rate • Using relative effects may exaggerate importance of predictor • Good for scaring people, getting published • Not so good for public health, scientific progress relative shark absolute penguin
  4. Risk communication • Many people mistake relative risk for absolute

    risk • Example: • 1/1000 women develop blood clots • 3/1000 women on birth control develop blood clots • => 200% increase in blood clots! • Change in probability is only 0.002 • Pregnancy much more dangerous than blood clots
  5. Logistic predictions • As always, remember the model: )$/$*) BT

    QSFEJDUPS WBSJBCMFT ćF PVUDPNF +0'' Ǿ' !/ JT B  PS  JOEJDBUPS UIBU BM BOJNBM QVMMFE UIF MFęIBOE MFWFS ćF QSFEJDUPS +-*.*Ǿ' !/ JT B  JOEJDBUPS MFęIBOE MFWFS XBT  PS XBT OPU  BUUBDIFE UP UIF QSPTPDJBM PQUJPO UIF TJEF XJUI DFT PG GPPE ćF *)$/$*) QSFEJDUPS JT BOPUIFS  JOEJDBUPS XJUI WBMVF  GPS UIF QBSU EJUJPO BOE WBMVF  GPS UIF DPOUSPM DPOEJUJPO /PX XFSF SFBEZ UP ĕU B NPEFM ćF NPEFM JNQMJFE CZ UIF SFTFBSDI RVFTUJPO JT JO NB BUJDBM GPSN ĕSTU -J ∼ #JOPNJBM(, QJ) MPHJU(QJ) = α + (β1 + β1$ $J)1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) SF - JOEJDBUFT +0'' Ǿ' !/ 1 JOEJDBUFT +-*.*Ǿ' !/ BOE $ JOEJDBUFT *)$/$*) LZ QBSU PG UIF NPEFM BCPWF JT UIF MJOFBS NPEFM GPS MPHJU(QJ) *U JT BO JOUFSBDUJPO NPEF JDI UIF BTTPDJBUJPO CFUXFFO 1J BOE UIF MPHPEET UIBU -J =  EFQFOET VQPO UIF WBMV #VU OPUF UIBU UIFSF JT OP NBJO FČFDU PG $J JUTFMG OP QMBJO CFUBDPFďDJFOU GPS DPOEJU • Use inverse link to convert linear model to outcome scale. Here, inverse link is logistic function.
  6. Logistic predictions /PUJDF UIBU FWFO UIPVHI (ǎǍǡǏ JTOU IVHFMZ CFUUFS

    UIBO (ǎǍǡǐ UIF EJČFSFODF IBT B TNBMM TUBOEBSE FSSPS &WFO EPVCMJOH UIF TUBOEBSE FSSPS UP HFU B  JOUFSWBM UIF PSEFS PG UIF UXP NPEFMT XPVME OPU DIBOHF 4P PO UIF CBTJT PG JOGPSNBUJPO DSJUFSJB FWFO UIPVHI NPEFM (ǎǍǡǐ PG DPVSTF ĕUT UIF TBNQMF CFUUFS UIBO NPEFM (ǎǍǡǏ CFDBVTF JU IBT NPSF QBSBNFUFST JU EPFT OPU ĕU TVďDJFOUMZ CFUUFS UP PWFSDPNF UIF FYQFDUFE PWFSĕUUJOH /PX MFUT MPPL BU UIF FTUJNBUFT GPS (ǎǍǡǐ 3 DPEF  +- $.ǿ(ǎǍǡǐȀ  ) / 1 Ǐǡǒʉ ǖǔǡǒʉ  ǍǡǍǒ Ǎǡǎǐ ǶǍǡǏǍ ǍǡǏǖ + ǍǡǓǎ ǍǡǏǐ Ǎǡǎǔ ǎǡǍǒ Mean StdDev 2.5% 97.5% a 0.05 0.13 -0.20 0.29 bp 0.61 0.23 0.17 1.05 bpC -0.10 0.26 -0.62 0.41 p <- logistic( a + (bp + bpC*C)*P ) '$--4ǿ- /#$)&$)"Ȁ /ǿ#$(+)5 .Ȁ  ʚǶ #$(+)5 . 5BLF B MPPL BU UIF CVJMUJO IFMQ Ǩ#$(+)5 . GPS EFUBJMT PO BMM PG UI 8FSF HPJOH UP GPDVT PO +0'' Ǿ' !/ BT UIF PVUDPNF UP QSFEJDU XJU *)$/$*) BT QSFEJDUPS WBSJBCMFT ćF PVUDPNF +0'' Ǿ' !/ JT B  P GPDBM BOJNBM QVMMFE UIF MFęIBOE MFWFS ćF QSFEJDUPS +-*.*Ǿ' !/ JT UIF MFęIBOE MFWFS XBT  PS XBT OPU  BUUBDIFE UP UIF QSPTPDJBM PQUJ QJFDFT PG GPPE ćF *)$/$*) QSFEJDUPS JT BOPUIFS  JOEJDBUPS XJUI W DPOEJUJPO BOE WBMVF  GPS UIF DPOUSPM DPOEJUJPO /PX XFSF SFBEZ UP ĕU B NPEFM ćF NPEFM JNQMJFE CZ UIF SFTFBSDI FNBUJDBM GPSN ĕSTU -J ∼ #JOPNJBM(, QJ) MPHJU(QJ) = α + (β1 + β1$ $J)1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) )FSF - JOEJDBUFT +0'' Ǿ' !/ 1 JOEJDBUFT +-*.*Ǿ' !/ BOE $ JOEJD USJDLZ QBSU PG UIF NPEFM BCPWF JT UIF MJOFBS NPEFM GPS MPHJU(QJ) *U JT BO XIJDI UIF BTTPDJBUJPO CFUXFFO 1J BOE UIF MPHPEET UIBU -J =  EFQFO $  #VU OPUF UIBU UIFSF JT OP NBJO FČFDU PG $ JUTFMG OP QMBJO CFUBDPFď To compute p at MAP: If logit(p) = [linear model], then p = logistic( [linear model] )
  7. Logistic predictions • Functions link, sim, ensemble work the same

    way • Automatically account for the link function   $06/5*/( "/% $-"44*'*$"5*0/ 0.0 0.2 0.4 0.6 0.8 1.0 prosoc.left/condition proportion pulled left 0/0 1/0 0/1 1/1 'ĶĴłĿIJ ƉƈƊ .PEFM BW EJDUJWF DIFDL GPS UIF "MPOH UIF IPSJ[POUBM BY PVU ćF WFSUJDBM JT UIF Q QVMMT QSFEJDUFE CMBDL &BDI CMVF USFOE JT BO JO ćF TIBEFE SFHJPO JT UIF WBM PG UIF NFBO QSFEJDUJ Figure 10.2
  8. Compare to Stan fit • Is the quadratic approximation still

    legit? Yes.   $06/5*/( "/% $-"44*'*$"5*0/ JT PO UIF MFę BOE B QBSUOFS JT QSFTFOU 4UJMM JUMM CF VTFGVM UP TFF IPX UP NPEFM UIF JOEJWJEVBM WBSJBUJPO FWFO JG JU JTOU HPJOH UP DIBOHF UIF FČFDUJWF JOGFSFODF JO UIJT DPOUFYU #VU ĕSTU MFUT DIFDL UIBU ."1 FTUJNBUJPO BOE JUT RVBESBUJD BTTVNQUJPO GPS UIF QPTUF SJPS EJTUSJCVUJPO JT PLBZ JO UIJT DBTF 8JUI (-.T SFDBMM UIFSF JT OP HVBSBOUFF PG B (BVTTJBO QPTUFSJPS EJTUSJCVUJPO FWFO JG BMM ZPVS QSJPST BSF (BVTTJBO 4P MFUT RVJDLMZ DPNQBSF UIF FTUJ NBUFT BCPWF UP UIF TBNF NPEFM ĕU VTJOH .$.$ WJB 4UBO ćJT JT NBEF FBTZ CZ (+Ǐ./) XIJDI XBT JOUSPEVDFE JO $IBQUFS  *UMM IBSWFTU UIF NPEFM GPSNVMB GSPN (ǎǍǡǐ BOE CVJME UIF .$.$ DPEF GSPN JU 3 DPEF  ȕ ' ) . !-*( /# / Ǐ ʚǶ  Ǐɶ- $+$ )/ ʚǶ  ȕ - Ƕ0. (+ !$/ /* " / /# !*-(0' (ǎǍǡǐ./) ʚǶ (+Ǐ./)ǿ (ǎǍǡǐ Ǣ Ǐ Ǣ $/ -ʙǎ Ǒ Ǣ 2-(0+ʙǎǍǍǍ Ȁ +- $.ǿ(ǎǍǡǐ./)Ȁ  ) / 1 '*2 - Ǎǡǖǒ 0++ - Ǎǡǖǒ )Ǿ !!  ǍǡǍǒ Ǎǡǎǐ ǶǍǡǏǎ ǍǡǏǖ ǐǎǒǐ + ǍǡǓǏ ǍǡǏǐ Ǎǡǎǒ ǎǡǍǒ ǏǔǓǎ + ǶǍǡǎǍ ǍǡǏǔ ǶǍǡǓǎ ǍǡǑǏ ǏǕǕǒ *G ZPV HMBODF CBDL BU UIF RVBESBUJD BQQSPYJNBUF QPTUFSJPS FTUJNBUFE GSPN (+ ZPVMM TFF UIFTF OVNCFST BSF BMNPTU FYBDUMZ UIF TBNF ćF QBJST QMPU DPOĕSNT UIBU UIF QPTUFSJPS JT NVMUJWBSJBUF (BVTTJBO  #*/0.*"- 3&(3&44*0/ +$-.ǿ(ǎǍǡǐ./)Ȁ * EPOU TIPX UIJT QMPU IFSF CVU QMFBTF EP HP SVO UIJT GPS ZPVSTFMG BO
  9. What about handedness? • Lots of evidence of handedness in

    these data: • Most chimps right handed • A few look like lefties • Let’s estimate unique intercepts   $06/5*/( 0.0 0.2 0.4 0.6 0.8 1.0 prosoc.left/condition proportion pulled left 0/0 1/0 0/1 1/1 CZ UIF MBTU UXP USFBUNFOU PO UIF GBS SJHIU P NFOUT GSPN UIF DPOUSPM DPOEJUJPO 4P JU N XBT QSFTFOU UP SFDFJWF UIF GPPE PO UIF PUI
  10. Handed chimpanzees UP VTF B WFDUPS PG JOUFSDFQUT POF GPS

    FBDI BDUPS ćJT GPSN JT FRVJWBMFOU UP NBLJO WBSJBCMFT CVU JU JT NPSF DPNQBDU BOE NJSSPST UIF TUSVDUVSF XFMM VTF MBUFS JO $IBQ CVJME NVMUJMFWFM NPEFMT )FSF JT UIF NBUIFNBUJDBM GPSN PG UIF NPEFM GPMMPXFE CZ FYQMBOBUJPO -J ∼ #JOPNJBM(, QJ) MPHJU(QJ) = αĮİŁļĿ[J] + (β1 + β1$ $J)1J αĮİŁļĿ ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) ćF POMZ DIBOHF JT UP BEE B MJUUMF ĮİŁļĿ[J] BT B TVCTDSJQU UP UIF JOUFSDFQU α BOE UIFO J UIF ĮİŁļĿ BMPOF BQQFBST BHBJO ćF OPUBUJPO BCPWF JT POF DPNNPO DPOWFOUJPO GP B WFDUPS PG QBSBNFUFST POF GPS FBDI WBMVF UIBU UIF WBSJBCMF ĮİŁļĿ DBO UBLF *NQMJDJU DBO UBLF UIF WBMVFT  UISPVHI  CFDBVTF UIFSF BSF  JOEJWJEVBMT JO UIF EBUB BOE UI /*- JO UIF EBUB JOEJDBUFT XIJDI JOEJWJEVBM XBT UIF GPDBM GPS FBDI SPX JO UIF OPUBUJPO αĮİŁļĿ[J] JOEJDBUFT VTJOH UIF WBMVF PG /*- UIBU JT GPVOE PO SPX J BOE U BQQFBS BT /*-ȁ$Ȃ JO 3 DPEF :PV DBO TBZ ĮİŁļĿ[J] PVU MPVE BT iUIF WBMVF PG Į DBTF Jw "OE UIF QSJPS GPS αĮİŁļĿ KVTU TUBUFT UIBU FWFSZ FMFNFOU PG UIF WFDUPS α HFUT QSJPS 8FMM HP TUSBJHIU UP ĕUUJOH UIJT NPEFM XJUI .$.$ TJODF UIF QPTUFSJPS EJTUSJC UVSO PVU UP IBWF TPNF TLFX JO JU )FSFT UIF DPEF unique intercept for each actor [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [38] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 [75] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 [112] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 [149] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [186] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 [223] 4 4 4 4 4 4 4 4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+ʙǒǍǍ Ȁ a[actor] ćSFF JOEJWJEVBMT UFOE UP QVMM UIF MFę BDSPTT BMM USFBUNFOUT 0OF JOEJWJEVBM BDUPS OVNCFS  BMXBZT QVMMFE UIF MFęIBOE MFWFS SFHBSEMFTT PG USFBUNFOU ćBUT UIF IPSJ[POUBM CMVF MJOF BU UIF UPQ JO 'ĶĴłĿIJ ƉƈƊ ćJOL PG IBOEFEOFTT IFSF BT B DPOGPVOE PS B NBTLJOH WBSJBCMF *G XF DBO NPEFM JU XFMM NBZCF XF DBO HFU B CFUUFS QJDUVSF PG XIBU IBQQFOJOH BDSPTT USFBUNFOUT 4P XIBU XF XJTI UP EP JT FTUJNBUF IBOEFEOFTT BT B EJTUJODU JOUFSDFQU GPS FBDI JOEJWJEVBM PS /*- JO UIF EBUB :PV DPVME EP UIJT VTJOH B EVNNZ WBSJBCMF GPS FBDI JOEJWJEVBM #VU JUMM CF NPSF DPOWFOJFOU UP VTF B WFDUPS PG JOUFSDFQUT POF GPS FBDI BDUPS ćJT GPSN JT FRVJWBMFOU UP NBLJOH EVNNZ WBSJBCMFT CVU JU JT NPSF DPNQBDU BOE NJSSPST UIF TUSVDUVSF XFMM VTF MBUFS JO $IBQUFS  UP CVJME NVMUJMFWFM NPEFMT )FSF JT UIF NBUIFNBUJDBM GPSN PG UIF NPEFM GPMMPXFE CZ FYQMBOBUJPO -J ∼ #JOPNJBM(, QJ) MPHJU(QJ) = αĮİŁļĿ[J] + (β1 + β1$ $J)1J αĮİŁļĿ ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) ćF POMZ DIBOHF JT UP BEE B MJUUMF ĮİŁļĿ[J] BT B TVCTDSJQU UP UIF JOUFSDFQU α BOE UIFO JO JUT QSJPS UIF ĮİŁļĿ BMPOF BQQFBST BHBJO ćF OPUBUJPO BCPWF JT POF DPNNPO DPOWFOUJPO GPS EFĕOJOH B WFDUPS PG QBSBNFUFST POF GPS FBDI WBMVF UIBU UI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ME UIF QBSBNFUFST "OE TP BęFS TBNQMJOH ZPV HFU BO FTUJNBUF GPS BMM  PG UIFN 3 DPEF  +- $.ǿ (ǎǍǡǑ Ǣ  +/#ʙǏ Ȁ  ) / 1 '*2 - Ǎǡǖǒ 0++ - Ǎǡǖǒ )Ǿ !! ȁǎȂ ǶǍǡǔǒ ǍǡǏǔ ǶǎǡǏǕ ǶǍǡǏǑ ǏǏǏǍ ȁǏȂ ǎǍǡǓǓ ǒǡǏǐ Ǐǡǖǒ ǏǎǡǍǖ ǖǕǍ ȁǐȂ ǶǎǡǍǒ ǍǡǏǖ ǶǎǡǓǏ ǶǍǡǒǏ ǏǏǍǐ ȁǑȂ ǶǎǡǍǓ ǍǡǏǕ Ƕǎǡǒǖ ǶǍǡǑǕ ǎǖǖǓ ȁǒȂ ǶǍǡǔǐ ǍǡǏǔ ǶǎǡǏǕ ǶǍǡǏǎ ǏǑǒǏ ȁǓȂ ǍǡǏǏ ǍǡǏǔ ǶǍǡǐǍ Ǎǡǔǐ ǏǎǒǕ ȁǔȂ ǎǡǕǎ ǍǡǑǍ ǎǡǍǒ ǏǡǓǍ Ǐǐǖǎ + ǍǡǕǑ ǍǡǏǓ Ǎǡǐǐ ǎǡǐǑ ǎǒǔǔ + ǶǍǡǎǐ ǍǡǐǍ ǶǍǡǓǖ ǍǡǑǔ Ǐǎǐǒ ćF  +/#ʙǏ JO UIF DBMM UP +- $. JT OFFEFE UP TIPX WFDUPS QBSBNFUFST :PVMM BQQSFDJBUF UIJT GFBUVSF B MPU PODF XF SFBDI NVMUJMFWFM NPEFMT XIJDI DBO IBWF WFSZ NBOZ WFDUPS QBSBNFUFST
  13. Hello, Ceiling, my old friend • Ceiling effect: • Actor

    #2 always pulls left, so not clear how strong handedness preference is • Non-bayesian estimate would be unidentified, because likelihood is flat for high values. Is common problem with logistic regression fit with glm() in R. • Lesson: GLMs sometimes need priors/regularization just to make sense.   $06/5*/( 0 10 20 30 0.00 0.02 0.04 0.06 0.08 a[2]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1 1 17 1 1 18 1 1 19 1 1 20 1 1
  15. Posterior predictions  #*/0.*"- 3&(3&44*0/  0.0 0.5 1.0 prosoc.left/condition

    proportion pulled left 0/0 1/0 0/1 1/1 actor 3 0.0 0.5 1.0 prosoc.left/condition proportion pulled left 0/0 1/0 0/1 1/1 actor 5 0.0 0.5 1.0 prosoc.left/condition proportion pulled left 0/0 1/0 0/1 1/1 actor 7 0.0 0.5 1.0 prosoc.left/condition proportion pulled left 0/0 1/0 0/1 1/1 actor 6 'ĶĴłĿIJ Ɖƈƌ 1PTUFSJPS QSFEJDUJPO DIFDL GPS NPEFM (ǎǍǡǑ UIF DIJNQBO[FF NPEFM UIBU JODMVEFT B VOJRVF JOUFSDFQU GPS FBDI JOEJWJEVBM &BDI QMPU TIPXT UIF FNQJSJDBM QSPQPSUJPO PG MFę QVMMT JO FBDI USFBUNFOU CMVF GPS B TJOHMF
  16. Aggregated chimpanzees • Any logistic regression can be recoded as

    aggregated binomial • Take all cases with same predictor values and sum outcome  #*/0.*"- 3&(3&44*0/   "HHSFHBUFE CJOPNJBM $IJNQBO[FFT BHBJO DPOEFOTFE *O UIF #$(+)5 . EBUB DPOUFYU UIF NPEFMT BMM DBMDVMBUFE UIF MJLFMJIPPE PG PCTFSWJOH FJUIFS [FSP PS POF QVMMT PG UIF MFęIBOE MFWFS ćF NPEFMT EJE TP CFDBVTF UIF EBUB XFSF PSHBOJ[FE TVDI UIBU FBDI SPX EF TDSJCFT UIF PVUDPNF PG B TJOHMF QVMM #VU JO QSJODJQMF UIF TBNF EBUB DPVME CF PSHBOJ[FE EJČFS FOUMZ "T MPOH BT XF EPOU DBSF BCPVU UIF PSEFS PG UIF JOEJWJEVBM QVMMT UIF TBNF JOGPSNBUJPO JT DPOUBJOFE JO B DPVOU PG IPX NBOZ UJNFT FBDI JOEJWJEVBM QVMMFE UIF MFęIBOE MFWFS GPS FBDI DPNCJOBUJPO PG QSFEJDUPS WBSJBCMFT 'PS FYBNQMF UP DBMDVMBUF U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ǔ Ǐ ǎ Ǎ ǎ ǖ ǐ Ǎ ǎ ǎ ǒ Ǒ ǎ ǎ ǎ ǎǍ ǒ Ǎ Ǎ Ǐ ǎǕ Ǔ ǎ Ǎ Ǐ ǎǕ ǔ Ǎ ǎ Ǐ ǎǕ Ǖ ǎ ǎ Ǐ ǎǕ ćF 3 DPMVNO PO UIF SJHIU JT UIF DPVOU PG UJNFT F XJUI UIF WBMVFT PG UIF QSFEJDUPST TIPXO PO FBDI DPNCJOBUJPOT PG UIF UXP QSFEJDUPST TP UIFSF BSF UIBU BDUPS OVNCFS  BMXBZT QVMMFE UIF MFęIBOE BMM ‰UIFSF XFSF  USJBMT GPS FBDI BOJNBM GPS F UIF TBNF JOGFSFODFT BT CFGPSF KVTU CZ EPJOH UIF G (ǎǍǡǒ ʚǶ (+ǿ '$./ǿ sum left pulls out of 18 trials prosoc_left condition actor pulled_left 1 0 0 1 0 2 0 0 1 1 3 1 0 1 0 4 0 0 1 0 5 1 0 1 1 6 1 0 1 1 7 1 0 1 0 8 1 0 1 0 9 0 0 1 0 10 0 0 1 0 11 0 0 1 1 12 1 0 1 0 13 0 0 1 1 14 1 0 1 1 15 0 0 1 0 16 1 0 1 1 17 1 0 1 0 18 0 0 1 0 [...] 135 1 1 2 1 136 1 1 2 1 137 1 1 2 1 138 0 1 2 1 139 1 1 2 1 140 1 1 2 1 141 0 1 2 1 142 1 1 2 1 143 0 1 2 1 144 1 1 2 1
  19. Aggregated chimpanzees ćF 3 DPMVNO PO UIF SJHIU JT UIF

    DPVOU PG UJNFT FBDI BDUPS QVMMFE UIF MFęIBOE MFWFS GPS USJBMT XJUI UIF WBMVFT PG UIF QSFEJDUPST TIPXO PO FBDI SPX 4P OPUJDF UIBU UIFSF BSF GPVS EJČFSFOU DPNCJOBUJPOT PG UIF UXP QSFEJDUPST TP UIFSF BSF GPVS SPXT GPS FBDI BDUPS OPX "MTP SFDBMM UIBU BDUPS OVNCFS  BMXBZT QVMMFE UIF MFęIBOE MFWFS "T B SFTVMU UIF DPVOUT GPS BDUPS  BSF BMM ‰UIFSF XFSF  USJBMT GPS FBDI BOJNBM GPS FBDI USFBUNFOU 4P OPX XF DPVME HFU FYBDUMZ UIF TBNF JOGFSFODFT BT CFGPSF KVTU CZ EPJOH UIF GPMMPXJOH 3 DPEF  (ǎǍǡǒ ʚǶ (+ǿ '$./ǿ 3 ʡ $)*(ǿ ǎǕ Ǣ + Ȁ Ǣ '*"$/ǿ+Ȁ ʚǶ  ʔ ǿ+ ʔ +ȉ*)$/$*)Ȁȉ+-*.*Ǿ' !/ Ǣ  ʡ )*-(ǿǍǢǎǍȀ Ǣ + ʡ )*-(ǿǍǢǎǍȀ Ǣ + ʡ )*-(ǿǍǢǎǍȀ Ȁ Ǣ /ʙǡ""- "/  Ȁ 5BLF OPUF PG UIF ǎǕ JO UIF TQPU XIFSF B ǎ VTFE UP CF /PX UIFSF BSF  USJBMT PO FBDI SPX BOE UIF MJLFMJIPPE EFĕOFT UIF QSPCBCJMJUZ PG FBDI DPVOU 3 PVU PG  USJBMT *OTQFDU UIF +- $. PVUQVU :PVMM TFF UIBU UIF QPTUFSJPS EJTUSJCVUJPO JT UIF TBNF BT UIF POF GSPN NPEFM (ǎǍǡǐ  "HHSFHBUFE CJOPNJBM (SBEVBUF TDIPPM BENJTTJPOT 0ęFO UIF OVNCFS PG USJBMT PO FBDI SPX JT OPU B DPOTUBOU 4P UIFO JO QMBDF PG UIF iǎǕw XF JOTFSU B WBSJBCMF JO UIF EBUB UBCMF -FUT XPSL UISPVHI BO FYBNQMF 'JSTU MPBE UIF EBUB Same posterior distribution as before. Just a different data coding.
  20. Example: UCB admissions • Numbers accepted/rejected to 6 graduate programs

    at UC Berkeley (largest depts in 1973) • Evidence of gender discrimination? dept applicant.gender admit reject applications 1 A male 512 313 825 2 A female 89 19 108 3 B male 353 207 560 4 B female 17 8 25 5 C male 120 205 325 6 C female 202 391 593 7 D male 138 279 417 8 D female 131 244 375 9 E male 53 138 191 10 E female 94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ǿ +*./ɶ Ȁ m10.7 m10.6 5960 5980 6000 6020 6040 6060 6080 deviance WAIC
  23. Proportional change in odds • How to interpret these coefficients?

    • exp(estimate) gives proportional change in odds • Is a relative effect size, so note base rate too exp(0.61) ≈ 1.84 => male has 184% odds of female Ȁ Ǣ /ʙ Ȁ " RVJDL 8"*$ DPNQBSJTPO WFSJĕFT UIBU UIF (' QSFEJDUPS WBSJBCMF JNQSPWFT FYQFDUFE PVU PGTBNQMF EFWJBODF CZ B WFSZ MBSHF BNPVOU 3 DPEF  *(+- ǿ (ǎǍǡǓ Ǣ (ǎǍǡǔ Ȁ   +    2 $"#/   (ǎǍǡǓ ǒǖǒǑǡǖ Ǐ ǍǡǍ ǎ ǐǑǡǖǕ  (ǎǍǡǔ ǓǍǑǓǡǐ ǎ ǖǎǡǒ Ǎ Ǐǖǡǖǐ ǎǖǡǎǐ ćJT DPNQBSJTPO TVHHFTUT UIBU HFOEFS NBUUFST B MPU 5P TFF IPX JU NBUUFST XF IBWF UP MPPL BU FTUJNBUFT GPS N 3 DPEF  +- $.ǿ(ǎǍǡǓȀ  ) / 1 Ǐǡǒʉ ǖǔǡǒʉ  ǶǍǡǕǐ ǍǡǍǒ ǶǍǡǖǐ ǶǍǡǔǐ ( ǍǡǓǎ ǍǡǍǓ ǍǡǑǖ ǍǡǔǑ 4FFNT MJLF CFJOH NBMF JT BO BEWBOUBHF JO UIJT DPOUFYU :PV DBO DPNQVUF UIF SFMBUJWF EJČFS FODF JO BENJTTJPO PEET BT FYQ(.) ≈ . ćJT NFBOT UIBU B NBMF BQQMJDBOUT PEET XFSF  PG B GFNBMF BQQMJDBOUT 0O UIF BCTPMVUF TDBMF XIJDI JT XIBU NBUUFST UIF EJČFSFODF JO QSPCBCJMJUZ PG BENJTTJPO JT 3 DPEF  +*./ ʚǶ 3/-/ǡ.(+' .ǿ (ǎǍǡǓ Ȁ +ǡ($/ǡ(' ʚǶ '*"$./$ǿ +*./ɶ ʔ +*./ɶ( Ȁ +ǡ($/ǡ! (' ʚǶ '*"$./$ǿ +*./ɶ Ȁ $!!ǡ($/ ʚǶ +ǡ($/ǡ(' Ƕ +ǡ($/ǡ! ('
  24. Compute probabilities • How to interpret these coefficients? • Or

    just compute probability, using logistic logistic( -0.83 ) logistic( -0.83 + 0.61 ) [1] 0.3036451 [1] 0.4452208 " RVJDL 8"*$ DPNQBSJTPO WFSJĕFT UIBU UIF (' QSFEJDUPS WBSJBCMF JNQSPWFT FYQFDUFE PVU PGTBNQMF EFWJBODF CZ B WFSZ MBSHF BNPVOU 3 DPEF  *(+- ǿ (ǎǍǡǓ Ǣ (ǎǍǡǔ Ȁ   +    2 $"#/   (ǎǍǡǓ ǒǖǒǑǡǖ Ǐ ǍǡǍ ǎ ǐǑǡǖǕ  (ǎǍǡǔ ǓǍǑǓǡǐ ǎ ǖǎǡǒ Ǎ Ǐǖǡǖǐ ǎǖǡǎǐ ćJT DPNQBSJTPO TVHHFTUT UIBU HFOEFS NBUUFST B MPU 5P TFF IPX JU NBUUFST XF IBWF UP MPPL BU FTUJNBUFT GPS N 3 DPEF  +- $.ǿ(ǎǍǡǓȀ  ) / 1 Ǐǡǒʉ ǖǔǡǒʉ  ǶǍǡǕǐ ǍǡǍǒ ǶǍǡǖǐ ǶǍǡǔǐ ( ǍǡǓǎ ǍǡǍǓ ǍǡǑǖ ǍǡǔǑ 4FFNT MJLF CFJOH NBMF JT BO BEWBOUBHF JO UIJT DPOUFYU :PV DBO DPNQVUF UIF SFMBUJWF EJČFS FODF JO BENJTTJPO PEET BT FYQ(.) ≈ . ćJT NFBOT UIBU B NBMF BQQMJDBOUT PEET XFSF  PG B GFNBMF BQQMJDBOUT 0O UIF BCTPMVUF TDBMF XIJDI JT XIBU NBUUFST UIF EJČFSFODF JO QSPCBCJMJUZ PG BENJTTJPO JT 3 DPEF  +*./ ʚǶ 3/-/ǡ.(+' .ǿ (ǎǍǡǓ Ȁ +ǡ($/ǡ(' ʚǶ '*"$./$ǿ +*./ɶ ʔ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NFBOT UIBU UIF NFEJBO FTUJNBUF PG UIF NBMF BEWBOUBHF JT BCPVU  XJUI B  JOUFSWBM GSPN  UP BMNPTU  :PV NBZ BMTP XBOU UP JOTQFDU UIF EFOTJUZ QMPU  ).ǿ$!!ǡ($/Ȁ OPU TIPXO 
  26. 1.6 1.8 2.0 2.2 0 1 2 3 exp(bm) Density

    Odds ratios (relative risk) 0.10 0.14 0.18 0 5 10 15 20 25 30 Pr(Admit|male) - Pr(Admit|female) Density Probability (absolute risk)
  27. 0.0 0.2 0.4 0.6 0.8 1.0 case admit 1 2

    3 4 5 6 7 8 9 10 11 12 Posterior validation check A B C D E F 'ĶĴłĿIJ Ɖƈƍ 1PTUFSJPS WBMJEBUJPO GPS NPEFM (ǎǍǡǓ #MVF QPJOUT BSF PC TFSWFE QSPQPSUJPOT BENJUUFE GPS FBDI SPX JO UIF EBUB XJUI QPJOUT GSPN UIF TBNF EFQBSUNFOU DPOOFDUFE CZ B CMVF MJOF 0QFO QPJOUT UIF UJOZ WFSUJDBM CMBDL MJOFT XJUIJO UIFN BOE UIF DSPTTFT BSF FYQFDUFE QSPQPSUJPOT  JO m f Females admitted more in all but 2 departments
  28. Departments vary • Overall admission rates vary a lot across

    departments • Use unique intercepts to control for that variation IJMF JU JT USVF PWFSBMM UIBU GFNBMFT IBE B MPXFS QSPCBCJMJUZ PG BENJTTJPO JO UIF SMZ OPU USVF XJUIJO NPTU EFQBSUNFOUT "OE OPUF UIBU KVTU JOTQFDUJOH UIF Q JPO BMPOF XPVME OFWFS IBWF SFWFBMFE UIBU GBDU UP VT 8F IBE UP BQQFBM UP TPN IF ĕU NPEFM *O UIJT DBTF JU XBT B TJNQMF QPTUFSJPS WBMJEBUJPO DIFDL FBE PG BTLJOH XIBU BSF UIF BWFSBHF QSPCBCJMJUJFT PG BENJTTJPO GPS GFNBMFT BO M EFQBSUNFOUT XF JOTUFBE XBOU UP BTL XIBU JT UIF QSPCBCJMJUZ PG GFNBMF BE EFQBSUNFOU BOE IPX NVDI PO BWFSBHF JT B NBMF NPSF PS MFTT MJLFMZ UP CF B BDI EFQBSUNFOU ćF TUBUJTUJDBM DPOKFDUVSF JT UIBU JG XF BMMPX UIF PWFSBMM QSP TJPO UP WBSZ CZ EFQBSUNFOU UIFO UIF NPEFM XJMM CF BTLJOH B CFUUFS RVFTUJPO UIBU BTLT UIJT OFX RVFTUJPO OBENJU,J ∼ #JOPNJBM(OJ, QJ) MPHJU(QJ) = αıIJĽŁ[J] + βN NJ αıIJĽŁ ∼ /PSNBM(, ) βN ∼ /PSNBM(, ) IJĽŁ JOEFYFT EFQBSUNFOU 4P OPX FBDI EFQBSUNFOU HFUT JUT PXO MPHPEET PG ĽŁ CVU UIF NPEFM TUJMM FTUJNBUFT B VOJWFSTBM BEKVTUNFOU‰TBNF JO BMM EFQBSUN MF BQQMJDBUJPO βN 
  29. Departments vary 'JUUJOH UIJT NPEFM BMPOH XJUI B WFSTJPO UIBU

    PNJUT (' JT TUSBJHIUGPSXBSE 8FMM VTF UIF JOEFYJOH OPUBUJPO BHBJO UP DPOTUSVDU BO JOUFSDFQU GPS FBDI EFQBSUNFOU #VU ĕSTU XF BMTP OFFE UP DPOTUSVDU B OVNFSJDBM JOEFY UIBU OVNCFST UIF EFQBSUNFOUT  UISPVHI  ćF GVODUJPO * - Ǿ$) 3 DBO EP UIJT GPS VT VTJOH UIF  +/ GBDUPS BT JOQVU )FSFT UIF DPEF UP DPOTUSVDU UIF JOEFY ĕU CPUI NPEFMT BOE UIFO DPNQBSF BMM GPVS NPEFMT ĕU TP GBS JO UIJT FYBNQMF 3 DPEF  ɶ +/Ǿ$ ʚǶ * - Ǿ$) 3ǿ ɶ +/ Ȁ (ǎǍǡǕ ʚǶ (+ǿ '$./ǿ ($/ ʡ $)*(ǿ ++'$/$*). Ǣ + Ȁ Ǣ '*"$/ǿ+Ȁ ʡ ȁ +/Ǿ$Ȃ Ǣ ȁ +/Ǿ$Ȃ ʡ )*-(ǿǍǢǎǍȀ Ȁ Ǣ /ʙ Ȁ (ǎǍǡǖ ʚǶ (+ǿ '$./ǿ ($/ ʡ $)*(ǿ ++'$/$*). Ǣ + Ȁ Ǣ '*"$/ǿ+Ȁ ʡ ȁ +/Ǿ$Ȃ ʔ (ȉ(' Ǣ ȁ +/Ǿ$Ȃ ʡ )*-(ǿǍǢǎǍȀ Ǣ ( ʡ )*-(ǿǍǢǎǍȀ Ȁ Ǣ /ʙ Ȁ *(+- ǿ (ǎǍǡǓ Ǣ (ǎǍǡǔ Ǣ (ǎǍǡǕ Ǣ (ǎǍǡǖ Ȁ   +    2 $"#/   (ǎǍǡǕ ǒǏǍǍǡǖ Ǔ ǍǡǍ ǍǡǒǓ ǒǔǡǍǏ  (ǎǍǡǖ ǒǏǍǎǡǑ ǔ Ǎǡǒ ǍǡǑǑ ǒǔǡǍǓ ǏǡǑǕ
  30. Departments vary ($/ ʡ $)*(ǿ ++'$/$*). Ǣ + Ȁ Ǣ

    '*"$/ǿ+Ȁ ʡ ȁ +/Ǿ$Ȃ ʔ (ȉ(' Ǣ ȁ +/Ǿ$Ȃ ʡ )*-(ǿǍǢǎǍȀ Ǣ ( ʡ )*-(ǿǍǢǎǍȀ Ȁ Ǣ /ʙ Ȁ *(+- ǿ (ǎǍǡǓ Ǣ (ǎǍǡǔ Ǣ (ǎǍǡǕ Ǣ (ǎǍǡǖ Ȁ   +    2 $"#/   (ǎǍǡǕ ǒǏǍǍǡǖ Ǔ ǍǡǍ ǍǡǒǓ ǒǔǡǍǏ  (ǎǍǡǖ ǒǏǍǎǡǑ ǔ Ǎǡǒ ǍǡǑǑ ǒǔǡǍǓ ǏǡǑǕ 0.0 case 1 2 3 4 5 6 7 8 9 10 11 12 F 'ĶĴłĿIJ ƉƈƎ 1PTUFSJPS WBMJEBUJPO GPS (ǎǍǡǖ ćF VOJRVF JOUFSDFQUT GPS FBDI EFQBSUNFOU " UISPVHI ' DBQUVSF WBSJBUJPO JO PWFSBMM BENJTTJPO SBUFT BNPOH EFQBSU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FT BNPOH EFQBSUNFOUT ćJT BMMPXT UIF NPEFM UP DPNQBSF NBMF BOE GFNBMF BENJTTJPO SBUFT DPOUSPMMJOH GPS IFUFSPHFOFJUZ BDSPTT EFQBSUNFOUT (ǎǍǡǓ ǒǖǒǑǡǕ Ǐ ǔǒǐǡǖ ǍǡǍǍ ǐǑǡǖǕ ǑǕǡǒǐ (ǎǍǡǔ ǓǍǑǓǡǐ ǎ ǕǑǒǡǑ ǍǡǍǍ Ǐǖǡǖǒ ǒǏǡǐǔ ćF OFX NPEFMT ĕU NVDI CFUUFS VOTVSQSJTJOHMZ #VU OPX UIF NPEFM XJUIPVU (' JT SBOLFE ĕSTU 4UJMM UIF 8"*$ EJČFSFODF CFUXFFO (ǎǍǡǕ BOE (ǎǍǡǖ JT UJOZ‰CPUI NPEFMT HFU BCPVU IBMG UIF "LBJLF XFJHIU *E DBMM UIJT B UJF 4P UIFSFT NPEFTU TVQQPSU GPS TPNF FČFDU PG HFOEFS FWFO JG JU JT PWFSĕU B MJUUMF 4P MFUT MPPL BU UIF FTUJNBUFT GSPN N BOE TFF IPX UIF FTUJNBUFE BTTPDJBUJPO PG HFOEFS XJUI BENJTTJPO IBT DIBOHFE 3 DPEF  +- $.ǿ (ǎǍǡǖ Ǣ  +/#ʙǏ Ȁ  ) / 1 Ǐǡǒʉ ǖǔǡǒʉ ȁǎȂ ǍǡǓǕ ǍǡǎǍ ǍǡǑǖ ǍǡǕǕ ȁǏȂ ǍǡǓǑ ǍǡǎǏ ǍǡǑǎ ǍǡǕǔ ȁǐȂ ǶǍǡǒǕ ǍǡǍǔ ǶǍǡǔǐ ǶǍǡǑǐ ȁǑȂ ǶǍǡǓǎ ǍǡǍǖ ǶǍǡǔǕ ǶǍǡǑǑ ȁǒȂ ǶǎǡǍǓ ǍǡǎǍ ǶǎǡǏǒ ǶǍǡǕǓ ȁǓȂ ǶǏǡǓǏ ǍǡǎǓ ǶǏǡǖǐ ǶǏǡǐǎ ( ǶǍǡǎǍ ǍǡǍǕ ǶǍǡǏǓ ǍǡǍǓ ćF FTUJNBUF GPS ( HPFT JO UIF PQQPTJUF EJSFDUJPO OPX 0O UIF QSPQPSUJPOBM PEET TDBMF UIF FTUJNBUF CFDPNFT FYQ(−.) ≈ . 4P B NBMF JO UIJT TBNQMF IBT BCPVU  UIF PEET PG
  31. With dummies Without 0.0 0.2 0.4 0.6 0.8 1.0 case

    admit 1 2 3 4 5 6 7 8 9 10 11 12 Posterior validation check A B C D E F 'ĶĴłĿIJ ƉƈƎ 1PTUFSJPS WBMJEBUJPO GPS (ǎǍǡǖ ćF VOJRVF JOUFSDFQUT GPS FBDI EFQBSUNFOU " UISPVHI ' DBQUVSF WBSJBUJPO JO PWFSBMM BENJTTJPO SBUFT BNPOH EFQBSUNFOUT ćJT BMMPXT UIF NPEFM UP DPNQBSF NBMF BOE GFNBMF BENJTTJPO SBUFT DPOUSPMMJOH GPS IFUFSPHFOFJUZ BDSPTT EFQBSUNFOUT (ǎǍǡǓ ǒǖǒǑǡǕ Ǐ ǔǒǐǡǖ ǍǡǍǍ ǐǑǡǖǕ ǑǕǡǒǐ (ǎǍǡǔ ǓǍǑǓǡǐ ǎ ǕǑǒǡǑ ǍǡǍǍ Ǐǖǡǖǒ ǒǏǡǐǔ ćF OFX NPEFMT ĕU NVDI CFUUFS VOTVSQSJTJOHMZ #VU OPX UIF NPEFM XJUIPVU (' JT SBOLF ĕSTU 4UJMM UIF 8"*$ EJČFSFODF CFUXFFO (ǎǍǡǕ BOE (ǎǍǡǖ JT UJOZ‰CPUI NPEFMT HFU BCPV IBMG UIF "LBJLF XFJHIU *E DBMM UIJT B UJF 4P UIFSFT NPEFTU TVQQPSU GPS TPNF FČFDU PG HFOEF FWFO JG JU JT PWFSĕU B MJUUMF 4P MFUT MPPL BU UIF FTUJNBUFT GSPN N BOE TFF IPX UIF FTUJNBUF   $06/5*/( "/% $-"44*'*$"5*0/ 0.0 0.2 0.4 0.6 0.8 1.0 case admit 1 2 3 4 5 6 7 8 9 10 11 12 Posterior validation check A B C D E F m f m f
  32. Binomial GLM’s • Predict counts with a fixed maximum •

    Use logit link • Distrust MAP estimation & QA • may work, but routinely does not • regularization even more important now • Convert back to probability/count scale to plot predictions • Focus on predictions, not parameters
  33. sum large mean count events low rate count events low

    probability many trials dnorm dgamma dpois dbinom dexp Z ∼ /PSNBM(µ, σ) Z ∼ #JOPNJBM(O, Q) Z ∼ 1PJTTPO(λ) Z ∼ (BNNB(λ, L) Z ∼ &YQPOFOUJBM(λ)
  34. 0 5 10 15 20 0.0 0.1 0.2 0.3 0.4

    0.5 duration Density 0 2 4 6 8 10 0 500 1500 2500 Count Frequency > mean(y) [1] 3.9298 > var(y) [1] 2.3843
  35. 0 5 10 15 20 0.02 0.06 0.10 duration Density

    0 2 4 6 8 10 0 1000 3000 Count Frequency > mean(y) [1] 0.9478 > var(y) [1] 0.8543
  36. 0 5 10 15 20 0.020 0.030 0.040 0.050 duration

    Density 0 20 40 60 80 100 0 500 1000 1500 Count Frequency > mean(y) [1] 4.8879 > var(y) [1] 4.6032
  37. > mean(y) [1] 2.84 > var(y) [1] 2.83 0 2

    4 6 8 10 0 500 1500 Count Frequency p = 0.014 , n = 200 0 5 10 15 0 500 1000 1500 Count Frequency p = 0.014 , n = 500 > mean(y) [1] 7.07 > var(y) [1] 7.02 0 5 10 15 20 25 0 200 600 1000 Count Frequency p = 0.014 , n = 900 > mean(y) [1] 12.76 > var(y) [1] 12.65 0 5 10 15 20 0 400 800 1200 Count Frequency p = 0.005 , n = 2000 > mean(y) [1] 9.96 > var(y) [1] 9.79 0 10 20 30 40 0 200 400 600 800 Count Frequency p = 0.012 , n = 2000 > mean(y) [1] 24.80 > var(y) [1] 24.72 > mean(y) [1] 1.20 > var(y) [1] 1.20 0 2 4 6 8 0 1000 2000 3000 Count Frequency p = 2e-04 , n = 6000
  38. Poisson GLMs • Counts without upper limit • Single parameter:

    events per unit time/distance • Variance equal to mean Z ∼ 1PJTTPO(λ) Z J ∼ /PSNBM(µJ, σ), µJ = α + βYJ &(Z J |YJ) = α + βYJ ∂ ∂YJ &(Z J |YJ) = β Z J ∼ #JOPNJBM(Q J, O), &(Z) = λ WBS(Z) = λ Z J ∼ /PSNBM(µJ, σ), µJ = α + βYJ &(Z J |YJ) = α + βYJ ∂ ∂YJ &(Z J |YJ) = β 0 5 10 15 0 500 1000 1500 Count Frequency 0 5 10 20 30 0 200 400 600 800 Count Frequency
  39. Poisson GLMs • Examples: • Soccer goals per game •

    Fissions per unit time in Uranium • Photons striking a detector • Soldiers killed by horse kicks, per year • DNA mutations per strand per generation Siméon Denis Poisson (1781–1840)
  40. Oceanic tool complexity   (&/&3"-*;&% -*/&"3 . 3 DPEF

     GORJSRS  ORJ G3RSXODWLRQ GFRQWDFWKLJK  LIHOVH G&RQWDFW 8FÔMM DPOTJEFS B TFSJFT PG GPVS NPEFM G  B 1PJTTPO NPEFM XJUI B DPOTUBOU NFB EFQFOET VQPO MPHQPQVMBUJPO  B NPE DPOUBDU SBUF BOE  B NPEFM UIBU JOUFS culture population contact total_tools mean_TU 1 Malekula 1100 low 13 3.2 2 Tikopia 1500 low 22 4.7 3 Santa Cruz 3600 low 24 4.0 4 Yap 4791 high 43 5.0 5 Lau Fiji 7400 high 33 5.0 6 Trobriand 8000 high 19 4.0 7 Chuuk 9200 high 40 3.8 8 Manus 13000 low 28 6.6 9 Tonga 17500 high 55 5.4 10 Hawaii 275000 low 71 6.6 Dr. Michelle Kline (ASU) (1) Complexity of toolkit proportional to magnitude of population? (2) Contact with other islands moderates impact?
  41. Anatomy of Poisson GLM -FUT CVJME OPX 'JSTU XF NBLF

    TPNF OFX DPMVNOT XJUI UIF MPH PG +*+0'/$ EVNNZ WBSJBCMF GPS IJHI *)// DPEF  ɶ'*"Ǿ+*+ ʚǶ '*"ǿɶ+*+0'/$*)Ȁ ɶ*)//Ǿ#$"# ʚǶ $! '. ǿ ɶ*)//ʙʙǫ#$"#ǫ Ǣ ǎ Ǣ Ǎ Ȁ ćF NPEFM UIBU DPOGPSNT UP UIF SFTFBSDI IZQPUIFTJT JODMVEFT BO JOUFSBDUJPO CFUX QPQVMBUJPO BOE DPOUBDU SBUF *O NBUI GPSN JU JT 5J ∼ 1PJTTPO(λJ) MPH λJ = α + β1 MPH 1J + β$ $J + β1$ $J MPH 1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β$ ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) XIFSF 1 JT +*+0'/$*) BOE $ JT *)//Ǿ#$"# *WF VTFE NPSF TUSPOHMZ SFHVMBSJ[J PO UIF β QBSBNFUFST CFDBVTF UIF TBNQMF JT TNBMM TP XF TIPVME GFBS PWFSĕUUJOH NPSF UIPTF /PSNBM(, ) QSJPST BSF QSPCBCMZ OPU DPOTFSWBUJWF FOPVHI "OE TJODF UIF Q BSF OPU DFOUFSFE‰NPSF PO UIBU B MJUUMF MBUFS‰UIFSFT OP UFMMJOH XIFSF α TIPVME F *WF BTTJHOFE BO FTTFOUJBMMZ ĘBU QSJPS UP JU "OE OPX UP ĕU UIF NPEFM UP UIF EBUB XF DBO VTF (+ BT VTVBM
  42. Anatomy of Poisson GLM -FUT CVJME OPX 'JSTU XF NBLF

    TPNF OFX DPMVNOT XJUI UIF MPH PG +*+0'/$ EVNNZ WBSJBCMF GPS IJHI *)// DPEF  ɶ'*"Ǿ+*+ ʚǶ '*"ǿɶ+*+0'/$*)Ȁ ɶ*)//Ǿ#$"# ʚǶ $! '. ǿ ɶ*)//ʙʙǫ#$"#ǫ Ǣ ǎ Ǣ Ǎ Ȁ ćF NPEFM UIBU DPOGPSNT UP UIF SFTFBSDI IZQPUIFTJT JODMVEFT BO JOUFSBDUJPO CFUX QPQVMBUJPO BOE DPOUBDU SBUF *O NBUI GPSN JU JT 5J ∼ 1PJTTPO(λJ) MPH λJ = α + β1 MPH 1J + β$ $J + β1$ $J MPH 1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β$ ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) XIFSF 1 JT +*+0'/$*) BOE $ JT *)//Ǿ#$"# *WF VTFE NPSF TUSPOHMZ SFHVMBSJ[J PO UIF β QBSBNFUFST CFDBVTF UIF TBNQMF JT TNBMM TP XF TIPVME GFBS PWFSĕUUJOH NPSF UIPTF /PSNBM(, ) QSJPST BSF QSPCBCMZ OPU DPOTFSWBUJWF FOPVHI "OE TJODF UIF Q BSF OPU DFOUFSFE‰NPSF PO UIBU B MJUUMF MBUFS‰UIFSFT OP UFMMJOH XIFSF α TIPVME F *WF BTTJHOFE BO FTTFOUJBMMZ ĘBU QSJPS UP JU "OE OPX UP ĕU UIF NPEFM UP UIF EBUB XF DBO VTF (+ BT VTVBM total_tools (outcome) expected tools for case i log link log population contact (0/1) interaction
  43. Anatomy of Poisson GLM -FUT CVJME OPX 'JSTU XF NBLF

    TPNF OFX DPMVNOT XJUI UIF MPH PG +*+0'/$ EVNNZ WBSJBCMF GPS IJHI *)// DPEF  ɶ'*"Ǿ+*+ ʚǶ '*"ǿɶ+*+0'/$*)Ȁ ɶ*)//Ǿ#$"# ʚǶ $! '. ǿ ɶ*)//ʙʙǫ#$"#ǫ Ǣ ǎ Ǣ Ǎ Ȁ ćF NPEFM UIBU DPOGPSNT UP UIF SFTFBSDI IZQPUIFTJT JODMVEFT BO JOUFSBDUJPO CFUX QPQVMBUJPO BOE DPOUBDU SBUF *O NBUI GPSN JU JT 5J ∼ 1PJTTPO(λJ) MPH λJ = α + β1 MPH 1J + β$ $J + β1$ $J MPH 1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β$ ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) XIFSF 1 JT +*+0'/$*) BOE $ JT *)//Ǿ#$"# *WF VTFE NPSF TUSPOHMZ SFHVMBSJ[J PO UIF β QBSBNFUFST CFDBVTF UIF TBNQMF JT TNBMM TP XF TIPVME GFBS PWFSĕUUJOH NPSF UIPTF /PSNBM(, ) QSJPST BSF QSPCBCMZ OPU DPOTFSWBUJWF FOPVHI "OE TJODF UIF Q BSF OPU DFOUFSFE‰NPSF PO UIBU B MJUUMF MBUFS‰UIFSFT OP UFMMJOH XIFSF α TIPVME F *WF BTTJHOFE BO FTTFOUJBMMZ ĘBU QSJPS UP JU "OE OPX UP ĕU UIF NPEFM UP UIF EBUB XF DBO VTF (+ BT VTVBM total_tools (outcome) expected tools for case i log link
  44. Fitting α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β$

    ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) XIFSF 1 JT +*+0'/$*) BOE $ JT *)//Ǿ#$"# *WF VTFE NPSF TUSPOHMZ SFHVMBSJ[JOH QSJPST PO UIF β QBSBNFUFST CFDBVTF UIF TBNQMF JT TNBMM TP XF TIPVME GFBS PWFSĕUUJOH NPSF *OEFFE UIPTF /PSNBM(, ) QSJPST BSF QSPCBCMZ OPU DPOTFSWBUJWF FOPVHI "OE TJODF UIF QSFEJDUPST BSF OPU DFOUFSFE‰NPSF PO UIBU B MJUUMF MBUFS‰UIFSFT OP UFMMJOH XIFSF α TIPVME FOE VQ TP *WF BTTJHOFE BO FTTFOUJBMMZ ĘBU QSJPS UP JU "OE OPX UP ĕU UIF NPEFM UP UIF EBUB XF DBO VTF (+ BT VTVBM 3 DPEF  (ǎǍǡǎǍ ʚǶ (+ǿ '$./ǿ /*/'Ǿ/**'. ʡ +*$.ǿ '( ȀǢ '*"ǿ'(Ȁ ʚǶ  ʔ +ȉ'*"Ǿ+*+ ʔ ȉ*)//Ǿ#$"# ʔ +ȉ*)//Ǿ#$"#ȉ'*"Ǿ+*+Ǣ  ʡ )*-(ǿǍǢǎǍǍȀǢ ǿ+ǢǢ+Ȁ ʡ )*-(ǿǍǢǎȀ ȀǢ /ʙ Ȁ  ćF JNQBDU PG +*+0'/$*) PO UPPM DPVOUT JT JODSFBTFE CZ IJHI *)// ćJT JT UP TBZ UIBU UIF BTTPDJBUJPO CFUXFFO /*/'Ǿ/**'. BOE MPH +*+0'/$*) EFQFOET VQPO *)// 4P XF XJMM MPPL GPS B QPTJUJWF JOUFSBDUJPO CFUXFFO MPH +*+0'/$*) BOE *)// -FUT CVJME OPX 'JSTU XF NBLF TPNF OFX DPMVNOT XJUI UIF MPH PG +*+0'/$*) BOE B EVNNZ WBSJBCMF GPS IJHI *)// 3 DPEF  ɶ'*"Ǿ+*+ ʚǶ '*"ǿɶ+*+0'/$*)Ȁ ɶ*)//Ǿ#$"# ʚǶ $! '. ǿ ɶ*)//ʙʙǫ#$"#ǫ Ǣ ǎ Ǣ Ǎ Ȁ ćF NPEFM UIBU DPOGPSNT UP UIF SFTFBSDI IZQPUIFTJT JODMVEFT BO JOUFSBDUJPO CFUXFFO MPH QPQVMBUJPO BOE DPOUBDU SBUF *O NBUI GPSN JU JT 5J ∼ 1PJTTPO(λJ) MPH λJ = α + β1 MPH 1J + β$ $J + β1$ $J MPH 1J α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) β$ ∼ /PSNBM(, ) β1$ ∼ /PSNBM(, ) XIFSF 1 JT +*+0'/$*) BOE $ JT *)//Ǿ#$"# *WF VTFE NPSF TUSPOHMZ SFHVMBSJ[JOH QSJPST PO UIF β QBSBNFUFST CFDBVTF UIF TBNQMF JT TNBMM TP XF TIPVME GFBS PWFSĕUUJOH NPSF *OEFFE UIPTF /PSNBM(, ) QSJPST BSF QSPCBCMZ OPU DPOTFSWBUJWF FOPVHI "OE TJODF UIF QSFEJDUPST BSF OPU DFOUFSFE‰NPSF PO UIBU B MJUUMF MBUFS‰UIFSFT OP UFMMJOH XIFSF α TIPVME FOE VQ TP *WF BTTJHOFE BO FTTFOUJBMMZ ĘBU QSJPS UP JU "OE OPX UP ĕU UIF NPEFM UP UIF EBUB XF DBO VTF (+ BT VTVBM
  45. Beware marginal estimates  10*440/ 3&(3&44*0/  -FUT HMBODF BU

    UIF FTUJNBUFT KVTU UP SFNJOE PVSTFMWFT UIBU XIFO UIF NPEFM JODMVEFT BO JO UFSBDUJPO BOE FTQ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BSF OPU DFOUFSFE XF DBOU UFMM GSPN UIF UBCMF PG BMPOF XIBU JT HPJOH PO *MM TIPX UIF EPUDIBSU GPS UIF FTUJNBUFT BT XFMM 3 DPEF  ǎǍǡǎǍǢ*--ʙȀ $.ǿ(ǎǍǡǎǍȀȀ ) / 1 Ǐǡǒʉ ǖǔǡǒʉ  +  + Ǒ ǍǡǐǓ ǍǡǏǑ ǎǡǓǒ ǎǡǍǍ ǶǍǡǖǕ ǶǍǡǎǐ ǍǡǍǔ Ǔ ǍǡǍǐ ǍǡǏǍ Ǎǡǐǐ ǶǍǡǖǕ ǎǡǍǍ ǍǡǎǏ ǶǍǡǍǕ ǖ ǍǡǕǑ ǶǎǡǔǑ ǎǡǒǓ ǶǍǡǎǐ ǍǡǎǏ ǎǡǍǍ ǶǍǡǖǖ Ǒ ǍǡǍǖ ǶǍǡǎǑ ǍǡǏǏ ǍǡǍǔ ǶǍǡǍǕ ǶǍǡǖǖ ǎǡǍǍ bpc bc bp a -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 Value UIF *--ʙ PQUJPO UP JODMVEF UIF DPSSFMBUJPOT BNPOH UIF QBSBNFUFST #VU ĕSTU BU UIF NBJO FČFDU PG MPHQPQVMBUJPO + JT QPTJUJWF BOE QSFDJTF CVU UIBU CPUI 
  46. Pairs plot (Stan samples)   $06/5*/( "/% $-"44*'*$"5*0/ a

    0.15 0.30 -0.3 0.0 0.3 -0.5 0.5 1.5 0.15 0.25 0.35 -0.98 bp -0.14 0.14 bc -3 -1 1 3 -0.5 0.5 1.5 -0.3 0.0 0.3 0.08 -0.1 -3 -1 1 3 -0.99 bcp a 0.1 0.15 0.25 0.35 -0.46 -0.76 3.0 3.3 3.6 -0.4 0.0 0.4 0.09
  47. Focus on predictions • Construct posterior predictions for high/low contact

    islands (assume log pop = 8 e.g.) BOE + PWFSMBQ [FSP TVCTUBOUJBMMZ 4P ZPV NJHIU UIJOL JUT TBGF UP TBZ UIBU MPHQPQVMBUJPO JT SFMJBCMZ BTTPDJBUFE XJUI UIF UPUBM UPPMT CVU UIBU DPOUBDU SBUF IBT OP JNQBDU PO QSFEJDUJPO JO UIJT NPEFM :PV NJHIU UIJOL UIBU CVU ZPVE CF XSPOH "T BMXBZT JUT WFSZ FBTZ UP CF NJTMFBE CZ UBCMFT PG FTUJNBUFT FTQFDJBMMZ XIFO BO JOUFSBDUJPO JT JOWPMWFE 5P QSPWF UIBU DPOUBDU SBUF JT IBWJOH BO JNQPSUBOU FČFDU PO QSFEJDUJPO JO UIJT NPEFM MFUT KVTU DPNQVUF TPNF DPVOUFSGBDUVBM QSF EJDUJPOT $POTJEFS UXP JTMBOET CPUI XJUI MPHQPQVMBUJPO PG  CVU POF XJUI IJHI DPOUBDU BOE UIF PUIFS XJUI MPX -FUT DBMDVMBUF λ UIF FYQFDUFE UPPM DPVOU GPS FBDI ćJT JT BDDPNQMJTIFE KVTU CZ ESBXJOH TBNQMFT GSPN UIF QPTUFSJPS QMVHHJOH UIPTF TBNQMFT JOUP UIF MJOFBS NPEFM BOE UIFO JOWFSUJOH UIF MJOL GVODUJPO UP HFU CBDL UP UIF TDBMF PG UIF PVUDPNF WBSJBCMF *O UIJT DBTF JOWFSUJOH UIF MJOL NFBOT FYQPOFOUJBUJOH XJUI 3+ 3 DPEF  +*./ ʚǶ 3/-/ǡ.(+' .ǿ(ǎǍǡǎǍȀ '(Ǿ#$"# ʚǶ 3+ǿ +*./ɶ ʔ +*./ɶ ʔ ǿ+*./ɶ+ ʔ +*./ɶ+ȀȉǕ Ȁ '(Ǿ'*2 ʚǶ 3+ǿ +*./ɶ ʔ +*./ɶ+ȉǕ Ȁ 4JODF UIF QPTUFSJPS JT B EJTUSJCVUJPO UIF DPOUFOUT PG '(Ǿ#$"# BOE '(Ǿ'*2 BSF BMTP EJTUSJCVUJPOT /PX MFUT DPNQVUF UIF EJČFSFODF CFUXFFO UIFTF UXP EJTUSJCVUJPOT UP HFU UIF EJTUSJCVUJPO PG QMBVTJCMF EJČFS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UFSJPS JT B EJTUSJCVUJPO UIF DPOUFOUT PG '(Ǿ#$"# BOE '(Ǿ'*2 BSF BMTP EJTUSJCVUJPOT /PX MFUT DPNQVUF UIF EJČFSFODF CFUXFFO UIFTF UXP EJTUSJCVUJPOT UP HFU UIF EJTUSJCVUJPO PG QMBVTJCMF EJČFSFODFT JO UPPMT CFUXFFO BO JTMBOE XJUI IJHI DPOUBDU BOE POF XJUI MPX DPOUBDU 3 DPEF  $!! ʚǶ '(Ǿ#$"# Ƕ '(Ǿ'*2 .0(ǿ$!! ʛ ǍȀȅ' )"/#ǿ$!!Ȁ ȁǎȂ ǍǡǖǒǏǔ • Construct contrast
  48. Focus on predictions '(Ǿ#$"# ʚǶ 3+ǿ +*./ɶ ʔ +*./ɶ ʔ

    ǿ+*./ɶ+ ʔ +*./ɶ+ȀȉǕ Ȁ '(Ǿ'*2 ʚǶ 3+ǿ +*./ɶ ʔ +*./ɶ+ȉǕ Ȁ 4JODF UIF QPTUFSJPS JT B EJTUSJCVUJPO UIF DPOUFOUT PG '(Ǿ#$"# BOE '(Ǿ'*2 BSF BMTP EJTUSJCVUJPOT /PX MFUT DPNQVUF UIF EJČFSFODF CFUXFFO UIFTF UXP EJTUSJCVUJPOT UP HFU UIF EJTUSJCVUJPO PG QMBVTJCMF EJČFSFODFT JO UPPMT CFUXFFO BO JTMBOE XJUI IJHI DPOUBDU BOE POF XJUI MPX DPOUBDU 3 DPEF  $!! ʚǶ '(Ǿ#$"# Ƕ '(Ǿ'*2 .0(ǿ$!! ʛ ǍȀȅ' )"/#ǿ$!!Ȁ ȁǎȂ ǍǡǖǒǏǔ   $06/5*/( "/% $-"44*'*$"5*0/ -5 0 5 10 15 20 25 0.00 0.04 0.08 lambda_high - lambda_low Density -3 -2 -1 0 1 2 -0.2 0.0 0.1 0.2 0.3 bc bpc 'ĶĴłĿIJ ƉƈƐ -Fę ćF EJTUSJCVUJPO PG QMBVTJCMF EJČFSFODF JO BWFSBHF UPPM
  49. Model comparison ȕ $)" )ʙǎ Ǒ !*- (*- ./' 

     ./$(/ . ȕ 2$'' '.* +'*/ /# *(+-$.*) ǿ $.').ǡ*(+- ʚǶ *(+- ǿ(ǎǍǡǎǍǢ(ǎǍǡǎǎǢ(ǎǍǡǎǏǢ(ǎ +'*/ǿ$.').ǡ*(+- Ȁ   +    2 $"#/   (ǎǍǡǎǎ ǔǖǡǍ ǑǡǏ ǍǡǍ ǍǡǓǏ ǎǎǡǎǖ  (ǎǍǡǎǍ ǕǍǡǎ Ǒǡǖ ǎǡǏ Ǎǡǐǒ ǎǎǡǑǏ ǎǡǏǕ (ǎǍǡǎǏ ǕǑǡǓ ǐǡǕ ǒǡǓ ǍǡǍǑ Ǖǡǖǎ ǕǡǑǔ (ǎǍǡǎǑ ǎǑǎǡǒ ǕǡǏ ǓǏǡǒ ǍǡǍǍ ǐǎǡǒǐ ǐǑǡǑǏ (ǎǍǡǎǐ ǎǑǖǡǕ ǎǓǡǔ ǔǍǡǕ ǍǡǍǍ ǑǐǡǖǓ ǑǓǡǍǎ m10.13 m10.14 m10.12 m10.10 m10.11 80 100 120 140 160 deviance WAIC ćF UPQ UXP NPEFMT JODMVEF CPUI QSFEJDUPST CVU UIF UPQ NPE BDUJPO CFUXFFO UIFN ćFSFT B MPU PG NPEFM XFJHIU BTTJHOFE U log pop, contact interaction log pop only null (intercept only) contact only $'' '.* +'*/ /# *(+-$.*) .').ǡ*(+- ʚǶ *(+- ǿ(ǎǍǡǎǍǢ(ǎǍǡǎǎǢ(ǎǍǡǎǏǢ(ǎǍǡǎǐǢ(ǎǍǡǎǑǢ)ʙǎ ǑȀ Ȁ /ǿ$.').ǡ*(+- Ȁ   +    2 $"#/   ǡǎǎ ǔǖǡǍ ǑǡǏ ǍǡǍ ǍǡǓǏ ǎǎǡǎǖ  ǡǎǍ ǕǍǡǎ Ǒǡǖ ǎǡǏ Ǎǡǐǒ ǎǎǡǑǏ ǎǡǏǕ ǡǎǏ ǕǑǡǓ ǐǡǕ ǒǡǓ ǍǡǍǑ Ǖǡǖǎ ǕǡǑǔ ǡǎǑ ǎǑǎǡǒ ǕǡǏ ǓǏǡǒ ǍǡǍǍ ǐǎǡǒǐ ǐǑǡǑǏ ǡǎǐ ǎǑǖǡǕ ǎǓǡǔ ǔǍǡǕ ǍǡǍǍ ǑǐǡǖǓ ǑǓǡǍǎ m10.13 m10.14 m10.12 m10.10 m10.11 80 100 120 140 160 180 200 deviance WAIC UPQ UXP NPEFMT JODMVEF CPUI QSFEJDUPST CVU UIF UPQ NPEFM (ǎǍǡǎǎ FYDMVEFT UIF JOUF PO CFUXFFO UIFN ćFSFT B MPU PG NPEFM XFJHIU BTTJHOFE UP CPUI IPXFWFS ćJT TVHHFT Since WAIC (DIC, AIC, etc.) constructed over predictions, automatically accounts for posterior correlations
  50. Prediction ensemble  10*440/ 3&(3&44*0/ 7 8 9 10 11

    12 20 30 40 50 60 70 log-population total tools 'ĶĴłĿIJ ƉƈƑ &OTFN GPS UIF JTMBOET NPEF MBOET XJUI IJHI DPO BOE DPOĕEFODF SFHJP EJDUJPOT GPS JTMBOET WBMVFT PG MPHQPQVM BYJT ćF EBTIFE US QSFEJDUJPOT GPS MPX D  .$.$ JTMBOET -FUT WFSJGZ UIBU UIF ."1 FTUJNBUFT JO UI DVSBUFMZ EFTDSJCJOH UIF TIBQF PG UIF QPTUFSJPS EJTUSJCVUJPO 3FNFN high contact low contact
  51. Find your center • Centering also helps MCMC mix, so

    need fewer samples 7 8 9 10 11 12 20 log-population BYJT ćF EBTIFE USFOE BOE HSBZ SFHJPO BSF QSFEJDUJPOT GPS MPX DPOUBDU JTMBOET  .$.$ JTMBOET -FUT WFSJGZ UIBU UIF ."1 FTUJNBUFT JO UIF QSFWJPVT TFDUJPO BSF BD DVSBUFMZ EFTDSJCJOH UIF TIBQF PG UIF QPTUFSJPS EJTUSJCVUJPO 3FNFNCFS JO QSJODJQMF UIF QPT UFSJPS EJTUSJCVUJPO GPS B (-. NBZ OPU CF NVMUJWBSJBU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UFSFTUFE JO UIF TIBQF PG UIF QPTUFSJPS EJTUSJCVUJPO -PPL OPX BU UIF SJHIUIBOE QBJST QMPU JO 'ĶĴłĿIJ ƉƈƉƈ /PX UIPTF TUSPOH DPSSFMBUJPOT BSF HPOF "OE Un-centered log_pop: Centered log_pop:
  52. Poisson exposure (offsets) • Poisson outcome: events per unit time/distance

    • Q: What if time/distance varies across cases? • A: Use an exposure, aka offset OTIJQ CFUXFFO QSFEJDUPST BOE UIF FYQFDUFE WBMVF &YQPOFOUJBM SFMBUJPOTIJQT HS Z BOE GFX OBUVSBM QIFOPNFOB DBO SFNBJO FYQPOFOUJBM GPS MPOH 4P POF UIJOH UP XJUI B MPH MJOL JT XIFUIFS JU NBLFT TFOTF BU BMM SBOHFT PG UIF QSFEJDUPS WBSJBCMF F QBSBNFUFS λ JT UIF FYQFDUFE WBMVF CVU JUT BMTP DPNNPOMZ UIPVHIU PG BT B SB FUBUJPOT BSF DPSSFDU BOE SFBMJ[JOH UIJT BMMPXT VT UP NBLF 1PJTTPO NPEFMT GPS X SF WBSJFT BDSPTT DBTFT J 4VQQPTF GPS FYBNQMF UIBU B OFJHICPSJOH NPOBTUFSZ Q UPUBMT PG DPNQMFUFE NBOVTDSJQUT XIJMF ZPVS NPOBTUFSZ EPFT EBJMZ UPUBMT *G ZP TTFTTJPO PG CPUI TFUT PG SFDPSET IPX DPVME ZPV BOBMZ[F CPUI JO UIF TBNF NPE F DPVOUT BSF BHHSFHBUFE PWFS EJČFSFOU BNPVOUT PG UJNF EJČFSFOU FYQPTVSFT SFT IPX *NQMJDJUMZ λ JT FRVBM UP BO FYQFDUFE OVNCFS PG FWFOUT µ QFS VOJU F τ ćJT JNQMJFT UIBU λ = µ/τ XIJDI MFUT VT SFEFĕOF UIF MJOL ZJ ∼ 1PJTTPO(λJ) MPH λJ = MPH µJ τJ = α + βYJ IF MPHBSJUIN PG B SBUJP JT UIF TBNF BT B EJČFSFODF PG MPHBSJUINT XF DBO BMTP X MPH λJ = MPH µJ − MPH τJ = α + βYJ τ WBMVFT BSF UIF iFYQPTVSFTw 4P JG EJČFSFOU PCTFSWBUJPOT J IBWF EJČFSFOU FYQ exposure expected count
  53. Poisson exposure (offsets) TTFTTJPO PG CPUI TFUT PG SFDPSET IPX

    DPVME ZPV BOBMZ[F CPUI JO UIF TBNF NPE F DPVOUT BSF BHHSFHBUFE PWFS EJČFSFOU BNPVOUT PG UJNF EJČFSFOU FYQPTVSFT SFT IPX *NQMJDJUMZ λ JT FRVBM UP BO FYQFDUFE OVNCFS PG FWFOUT µ QFS VOJU F τ ćJT JNQMJFT UIBU λ = µ/τ XIJDI MFUT VT SFEFĕOF UIF MJOL ZJ ∼ 1PJTTPO(λJ) MPH λJ = MPH µJ τJ = α + βYJ IF MPHBSJUIN PG B SBUJP JT UIF TBNF BT B EJČFSFODF PG MPHBSJUINT XF DBO BMTP X MPH λJ = MPH µJ − MPH τJ = α + βYJ τ WBMVFT BSF UIF iFYQPTVSFTw 4P JG EJČFSFOU PCTFSWBUJPOT J IBWF EJČFSFOU FYQ IJT JNQMJFT UIBU UIF FYQFDUFE WBMVF PO SPX J JT HJWFO CZ MPH µJ = MPH τJ + α + βYJ τJ =  UIFO MPH τJ =  BOE XFSF CBDL XIFSF XF TUBSUFE #VU XIFO UIF F BDSPTT DBTFT UIFO τJ EPFT UIF JNQPSUBOU XPSL PG DPSSFDUMZ TDBMJOH UIF FYQFDUFE OUT GPS FBDI DBTF J 4P ZPV DBO NPEFM DBTFT XJUI EJČFSFOU FYQPTVSFT KVTU CZ X EJTUBODF τ ćJT JNQMJFT UIBU λ = µ/τ XIJDI MFUT VT SFEFĕOF UIF MJOL ZJ ∼ 1PJTTPO(λJ) MPH λJ = MPH µJ τJ = α + βYJ 4JODF UIF MPHBSJUIN PG B SBUJP JT UIF TBNF BT B EJČFSFODF PG MPHBSJUINT X MPH λJ = MPH µJ − MPH τJ = α + βYJ ćFTF τ WBMVFT BSF UIF iFYQPTVSFTw 4P JG EJČFSFOU PCTFSWBUJPOT J IBWF E UIFO UIJT JNQMJFT UIBU UIF FYQFDUFE WBMVF PO SPX J JT HJWFO CZ MPH µJ = MPH τJ + α + βYJ 8IFO τJ =  UIFO MPH τJ =  BOE XFSF CBDL XIFSF XF TUBSUFE #VU X WBSJFT BDSPTT DBTFT UIFO τJ EPFT UIF JNQPSUBOU XPSL PG DPSSFDUMZ TDBMJOH UI PG FWFOUT GPS FBDI DBTF J 4P ZPV DBO NPEFM DBTFT XJUI EJČFSFOU FYQPTVS  10*440/ 3&(3&44*0/ LF ZJ ∼ 1PJTTPO(µJ) MPH µJ = MPH τJ + α + βYJ JT B DPMVNO JO UIF EBUB 4P UIJT JT KVTU MJLF BEEJOH B QSFEJDUPS UIF MPHBSJU F XJUIPVU BEEJOH B QBSBNFUFS GPS JU ćFSF XJMM CF BO FYBNQMF MBUFS JO UIJT JPO PG CPUI TFUT PG SFDPSET IPX DPVME ZPV BOBMZ[F CPUI JO UIF TBNF NPEFM OUT BSF BHHSFHBUFE PWFS EJČFSFOU BNPVOUT PG UJNF EJČFSFOU FYQPTVSFT PX *NQMJDJUMZ λ JT FRVBM UP BO FYQFDUFE OVNCFS PG FWFOUT µ QFS VOJU UJN ćJT JNQMJFT UIBU λ = µ/τ XIJDI MFUT VT SFEFĕOF UIF MJOL ZJ ∼ 1PJTTPO(λJ) MPH λJ = MPH µJ τJ = α + βYJ HBSJUIN PG B SBUJP JT UIF TBNF BT B EJČFSFODF PG MPHBSJUINT XF DBO BMTP XSJ MPH λJ = MPH µJ − MPH τJ = α + βYJ VFT BSF UIF iFYQPTVSFTw 4P JG EJČFSFOU PCTFSWBUJPOT J IBWF EJČFSFOU FYQP QMJFT UIBU UIF FYQFDUFE WBMVF PO SPX J JT HJWFO CZ MPH µJ = MPH τJ + α + βYJ  UIFO MPH τJ =  BOE XFSF CBDL XIFSF XF TUBSUFE #VU XIFO UIF FYQ T DBTFT UIFO τJ EPFT UIF JNQPSUBOU XPSL PG DPSSFDUMZ TDBMJOH UIF FYQFDUFE OV S FBDI DBTF J 4P ZPV DBO NPEFM DBTFT XJUI EJČFSFOU FYQPTVSFT KVTU CZ XSJ
  54. Monastery tycoon  10*440/ 3&(3&44*0/ LF ZJ ∼ 1PJTTPO(µJ) MPH

    µJ = MPH τJ + α + βYJ JT B DPMVNO JO UIF EBUB 4P UIJT JT KVTU MJLF BEEJOH B QSFEJDUPS UIF MPHBSJU F XJUIPVU BEEJOH B QBSBNFUFS GPS JU ćFSF XJMM CF BO FYBNQMF MBUFS JO UIJT &YBNQMF 0DFBOJD UPPM DPNQMFYJUZ )FSFT BO FYBNQMF 1PJTTPO (-. BOB DJFUJFT PG 0DFBOJB QSPWJEF B OBUVSBM FYQFSJNFOU JO UFDIOPMPHJDBM FWPMVUJP SJDBM JTMBOE QPQVMBUJPOT QPTTFTTFE UPPM LJUT PG EJČFSFOU TJ[F ćFTF LJUT JO YFT CPBUT IBOE QMPXT BOE NBOZ PUIFS UZQFT PG UPPMT " OVNCFS PG UIFPS FS QPQVMBUJPOT XJMM CPUI EFWFMPQ BOE TVTUBJO NPSF DPNQMFY UPPM LJUT 4P U JO QPQVMBUJPO TJ[F JOEVDFE CZ OBUVSBM WBSJBUJPO JO JTMBOE TJ[F JO 0DFBOJ M FYQFSJNFOU UP UFTU UIFTF JEFBT *UT BMTP TVHHFTUFE UIBU DPOUBDU SBUFT BN FČFDUJWFMZ JODSFBTF QPQVMBUJPO TJ[F BT JUT SFMFWBOU UP UFDIOPMPHJDBM FWPM y: number manuscripts tau: number of days x: new monastery
  55. y days monastery 1 0 1 0 2 2 1

    0 3 0 1 0 4 2 1 0 5 1 1 0 6 1 1 0 7 0 1 0 8 4 1 0 9 2 1 0 10 6 1 0 11 3 1 0 12 1 1 0 13 1 1 0 14 1 1 0 15 2 1 0 16 2 1 0 17 1 1 0 18 3 1 0 19 3 1 0 20 0 1 0 21 3 1 0 22 2 1 0 23 0 1 0 24 1 1 0 25 3 1 0 26 2 1 0 27 2 1 0 28 0 1 0 29 0 1 0 30 3 1 0 y days monastery 31 2 7 1 32 6 7 1 33 2 7 1 34 1 7 1 Saint Jerome at work
  56. Fit the model 5BLF B MPPL BU UFYUUUE BOE DPOĕSN

    UIBU UIFSF BSF UISFF DPMVNOT UIF PCTFSWFE DPVOUT BSF JO 4 UIF OVNCFS PG EBZT FBDI DPVOU XBT UPUBMFE PWFS BSF JO 4. BOE UIF OFX NPOBTUFSZ JT JOEJDBUFE CZ (*)./ -4 5P ĕU UIF NPEFM BOE FTUJNBUF UIF SBUF PG NBOVTDSJQU QSPEVDUJPO BU FBDI NPOBTUFSZ XF KVTU DPNQVUF UIF MPH PG FBDI FYQPTVSF BOE UIFO JODMVEF UIBU WBSJBCMF JO MJOFBS NPEFM ćJT DPEF XJMM EP UIF KPC 3 DPEF  ȕ *(+0/ /# *!!. / ɶ'*"Ǿ4. ʚǶ '*"ǿ ɶ4. Ȁ ȕ !$/ /# (* ' (ǎǍǡǎǒ ʚǶ (+ǿ '$./ǿ 4 ʡ +*$.ǿ '( ȀǢ '*"ǿ'(Ȁ ʚǶ '*"Ǿ4. ʔ  ʔ ȉ(*)./ -4Ǣ   $06/5*/( "/% $-"44*'*$"5*0/  ʡ )*-(ǿǍǢǎǍǍȀǢ  ʡ )*-(ǿǍǢǎȀ ȀǢ /ʙ Ȁ 5P DPNQVUF UIF QPTUFSJPS EJTUSJCVUJPOT PG λ JO FBDI NPOBTUFSZ XF TBNQMF GSPN UIF QPTUFSJPS BOE UIFO KVTU VTF UIF MJOFBS NPEFM CVU XJUIPVU UIF PČTFU OPX 8F EPOU VTF UIF PČTFU BHBJO XIFO DPNQVUJOH QSFEJDUJPOT CFDBVTF UIF QBSBNFUFST BSF BMSFBEZ PO UIF EBJMZ TDBMF GPS CPUI NPOBTUFSJFT 3 DPEF  +*./ ʚǶ 3/-/ǡ.(+' .ǿ (ǎǍǡǎǒ Ȁ '(Ǿ*' ʚǶ 3+ǿ +*./ɶ Ȁ '(Ǿ) 2 ʚǶ 3+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OT
  58. Poisson GLMs • For counts without obvious upper bound •

    log link is customary; linear model of magnitude • Beware exploding exponential predictions • Use offset to adjust exposure duration/distance • Focus on predictions, not parameters • Convert back to count scale to interpret/plot • Predictions tend to be under-dispersed relative to data • Common problem for both binomial and Poisson GLMs => un-modeled heterogeneity
  59. Additional count distributions • Multinomial: generalized binomial, more than 2

    un-ordered outcomes • Tricky to use and understand • Geometric: number of trials until specific event • Common event-history (survival) distribution • Mixtures, coping with heterogeneity: • Beta-binomial: varying probabilities • gamma-Poisson: varying rates • many others (e.g. Dirichlet-multinomial)