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

Statistical Rethinking - Lecture 09

Statistical Rethinking - Lecture 09

Lecture 09 - Ensembles and Interactions - Statistical Rethinking: A Bayesian Course with R Examples

Richard McElreath

February 04, 2015
Tweet

More Decks by Richard McElreath

Other Decks in Education

Transcript

  1. Model identification irrelevant • Often biologists use AIC/DIC/WAIC to ID

    “true” model • Not what xIC designed to do • xIC designed to ID best model for prediction • N -> infty, xIC picks complex models • Not bad: estimates converge to “true” values • Must use all models and focus on predictions to make good inferences
  2. Model averaging • When computing predictions, average over posterior •

    For more than one model, can average the averages • Do not average parameter estimates, just predictions • Because parameters in different models live in different small worlds => don’t mean same thing, even if named same thing • But predictions reference common large world
  3. Model averaging • Model averaging procedure • Compute information weight

    for each model • Compute distribution of predictions for each model • Mix predictions using model weights • Result is one kind of prediction ensemble • Such ensembles can outperform single-model predictions
  4. 0.55 0.60 0.65 0.70 0.75 0.5 0.6 0.7 0.8 0.9

    neocortex kcal.per.g ' U ć D 8  F ćF SFTVMUJOH QMPU JT EJTQMBZFE JO 'ĶĴłĿIJ BOE GPDVT PO UIF EBTIFE SFHSFTTJPO MJOF BO ćPTF BSF UIF MJOFT UIF DPEF BCPWF QSPEVD /PX MFUT DPNQVUF BOE BEE NPEFM BWF DPNQVUF JT BO IJĻŀIJĺįĹIJ PG QPTUFSJPS QS UIFO *MM TIPX ZPV UIF DPEF UIBU BVUPNBUF FBDI TBNQMF JO UIF QPTUFSJPS Figure 6.13 GPDVTJOH PO DPVOUFSGBDUVBM QSFEJDUJPOT BDSPTT UIF SBOHF PG ) **-/ 3 3 DPEF  ȃ *(+0/ *0)/ -!/0' +- $/$*). ȃ ) **-/ 3 !-*( ƻǏǀ /* ƻǏǃ )Ǐ. , ʄǤ . ,ǭ!-*(ʃƻǏǀǐ/*ʃƻǏǃǐ' )"/#Ǐ*0/ʃƾƻǮ Ǐ+- $/ ʄǤ '$./ǭ &'Ǐ+ -Ǐ" ʃ - +ǭƻǐƾƻǮ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DI NPEFM  $PNQVUF UIF XFJHIU GPS FBDI NPEFM  $PNQVUF MJOFBS NPEFM BOE TJNVMBUFE PVUDPNFT GPS FBDI NPEFM  $PNCJOF UIFTF WBMVFT JOUP BO FOTFNCMF PG QSFEJDUJPOT VTJOH UIF NPEFM XFJHIUT BT QSPQPSUJPOT "OE UIJT JT XIBU UIF GVODUJPO ). (' DBO EP ćF ). (' GVODUJPO XPSLT B MPU MJLF '$)& BOE .$( *O GBDU JU KVTU DBMMT UIPTF GVODUJPOT GPS FBDI NPEFM ZPV HJWF JU BOE UIFO DPNCJOFT UIF SFTVMUT BDDPSEJOH UP "LBJLF XFJHIUT 4P UP CVJME BO FOTFNCMF BDDPSEJOH UP 8"*$ XFJHIU UIF EFGBVMU CFIBWJPS  3 DPEF  ($'&Ǐ ). (' ʄǤ ). (' ǭ (ǁǏƼƼ ǐ (ǁǏƼƽ ǐ (ǁǏƼƾ ǐ (ǁǏƼƿ ǐ /ʃǏ+- $/ Ǯ (0 ʄǤ ++'4ǭ ($'&Ǐ ). (' ɠ'$)& ǐ ƽ ǐ ( ) Ǯ (0Ǐ ʄǤ ++'4ǭ ($'&Ǐ ). (' ɠ'$)& ǐ ƽ ǐ  Ǯ '$) .ǭ )Ǐ. , ǐ (0 Ǯ .# ǭ (0Ǐ ǐ )Ǐ. , Ǯ ćF TPMJE SFHSFTTJPO MJOF BOE TIBEFE SFHJPO JO 'ĶĴłĿIJ ƎƉƋ EJTQMBZ UIFTF DBMDVMBUJPOT ćF SFHSFTTJPO MJOF XIJDI TIPXT UIF BWFSBHF µ BU FBDI WBMVF IPSJ[POUBM BYJT IBT IBSEMZ NPWFE BU BMM .PEFM (ǁǏƼƿ IBT BCPVU  PG UIF XFJHIU SFDBMM 4P UIJT NBLFT TFOTF top model only weighted ensemble
  5. Blizzard calibration • Was it bad to predict NY blizzard

    from ECMWF? • Accuracy better from ensemble • But welfare enhanced by being prepared => use extreme forecasts
  6. Curse of Tippecanoe • 1840–1960: Every US president elected in

    year ending in digit “0” died in office • W. H. Harrison first, “Old Tippecanoe” • Lincoln, Garfield, McKinley, Harding, FD Roosevelt • J. F. Kennedy last, assassinated in 1963 • Reagan broke the curse! • Trying all possible models: A formula for overfitting • Be thoughtful • Model averaging mitigates the curse • Admit data exploration
  7. Complexity can be good • Good reasons to use more

    complex models than AIC/DIC/WAIC recommend • Theory says predictor important, so estimate it • If you have a theory-motivated model, you want to know what data says about it
  8. Manatees and bombers   */5&3"$5*0/4 'ĶĴłĿIJ ƏƉ ŁļĽ %PSTBM

    TDBST GPS  BEVMU 'MPSJEB NBOBUFFT 3PXT PG Figure 7.1
  9. Manatees and bombers • Conditioning: Dependence on state • Everything

    is conditional • On data • On model • On information state (prior) • Interactions: Influence of predictor conditional on other predictor(s)
  10. Interaction effects • Interactions: Influence of predictor conditional on other

    predictor(s) • Influence of sugar in coffee depends on stirring • Influence of gene on phenotype depends on environment • Influence of skin color on cancer depends on latitude • Generalized linear models (GLMs): All predictors interact to some degree • Multilevel models: Massive interaction engines
  11. The value of being rugged • Economic indicators and terrain

    ruggedness for 234 countries   $0.1"3*/( .0%&-4 &WFSZUIJOH NBLFT NPSF TFOTF XJUI BO FYBNQMF 4P IFSF ZPVÔMM NFFU B TFU PG EBUB UIBU ZPVÔMM XPSL XJUI BHBJO JO UIF OFYU DIBQUFS (P BIFBE BOE MPBE UIF UBCMF 3 DPEF  OLEUDU\ UHWKLQNLQJ GDWD UXJJHG G  UXJJHG &BDI SPX JO UIJT EBUB GSBNF JT B DPVOUSZ BOE UIF WBSJPVT DPMVNOT BSF FDPOPNJD HFPHSBQIJD BOE IJTUPSJDBM GFBUVSFT 8FÔMM CF JOUFSFTUFE JO QSFEJDUJOH FDPOPNJD EFWFMPQNFOU BT B GVODUJPO PG HFU SFBEZ GPS JU IPX SVHHFE UIF UFSSBJO JT JO B DPVOUSZ 5IF WBSJBCMF UXJJHG JT B 5FSSBJO 3VHHFEOFTT *OEFY UIBU RVBOUJGJFT UIF UPQPHSBQIJD IFUFSPHFOFJUZ PG B MBOETDBQF *G ZPV JOTQFDU UIF EJTUSJCVUJPO PG UXJJHG JO UIF EBUB ZPVÔMM TFF UIBU JU IBT B MPOH SJHIU UBJM EVF UP B GFX WFSZ SVHHFE DPVOUSJFT MJLF /FQBM BOE 4XJU[FSMBOE "O FYQMBOBUPSZ WBSJBCMF XJUI B TLFXFE EJTUSJCVUJPO MJLF UIJT JT VTVBMMZ B HPPE DBOEJEBUF GPS QSFBOBMZTJT USBOTGPSNBUJPO 5IF SFBTPO JT UIBU B QSFEJDUPS WBSJBCMF UIBU GMBSFT PVU PO FJUIFS TJEF JT VOMJLFMZ UP CF MJOFBSMZ SFMBUFE UP BO PVUDPNF WBSJBCMF *O UIJT DBTF *ÔN HPJOH UP TLJQ UIJT TUFQ CPUI GPS UIF TBLF PG TJNQMJGZJOH UIF QSFTFOUBUJPO BOE CF DBVTF JU NBLFT MJUUMF EJGGFSFODF JO UIJT DBTF "GUFS XPSLJOH UISPVHI UIJT  $0.1"3*/( & 0 1 2 3 4 5 6 7 8 9 10 11 Terrain Ruggedness Index log GDP year 2000 Switzerland Kyrgyzstan Lebanon Nepal Tajikistan Yemen 'J UJ SV TP MJ TI UI UI P  OP ORJ UJGSSFB a UXJJHG
  12. • Split data into Africa and non-Africa: Figure 7.2 The

    value of being rugged   */5&3"$5*0/4 0 1 2 3 4 5 6 6 7 8 9 rugged log(rgdppc_2000) Africa 0 1 2 3 4 5 7 8 9 10 11 rugged log(rgdppc_2000) not Africa 'ĶĴłĿIJ ƏƊ 4FQBSBUF MJOFBS SFHSFTTJPOT JOTJEF BOE PVUTJEF PG "GSJDB GPS MPH ȃ (& '*" 1 -.$*) *! *0/*( ɠ'*"Ǭ"+ ʄǤ '*"ǭ ɠ-"++Ǭƽƻƻƻ Ǯ ȃ 3/-/ *0)/-$ . 2$/#  /  ʄǤ ǯ *(+' / Ǐ. .ǭɠ-"++ǬƽƻƻƻǮ ǐ ǰ ȃ .+'$/ *0)/-$ . $)/* !-$ ) )*/Ǥ!-$ ǏƼ ʄǤ ǯ ɠ*)/Ǭ!-$ʃʃƼ ǐ ǰ ȃ !-$ Ǐƻ ʄǤ ǯ ɠ*)/Ǭ!-$ʃʃƻ ǐ ǰ ȃ )*/ !-$ &BDI SPX JO UIFTF EBUB JT B DPVOUSZ BOE UIF WBSJPVT DPMVNOT BSF FDPOPNJD HFPHSBQIJD BOE IJTUPSJDBM GFBUVSFT ćF WBSJBCMF -0""  JT B 5FSSBJO 3VHHFEOFTT *OEFY UIBU RVBOUJĕFT UIF UPQPHSBQIJD IFUFSPHFOFJUZ PG B MBOETDBQF ćF PVUDPNF WBSJBCMF IFSF JT SFBM HSPTT EP NFTUJD QSPEVDU QFS DBQJUB GSPN UIF ZFBS  -"++Ǭƽƻƻƻ 8FMM VTF UIF MPHBSJUIN PG JU BT JT UZQJDBM GPS SFBTPOT TJNJMBS UP UIPTF XF EJTDVTTFE GPS CPEZ NBTT JO $IBQUFS  'JU UIF SFHSFTTJPO NPEFMT EJTQMBZFE JO 'ĶĴłĿIJ ƏƊ XJUI UIJT DPEF 3 DPEF  ȃ !-$) )/$*). (ǂǏƼ ʄǤ (+ǭ '$./ǭ '*"Ǭ"+ ʋ )*-(ǭ (0 ǐ .$"( Ǯ ǐ (0 ʄǤ  ɾ -Ƿ-0""  ǐ  ʋ )*-(ǭ ǃ ǐ Ƽƻƻ Ǯ ǐ - ʋ )*-(ǭ ƻ ǐ Ƽ Ǯ ǐ .$"( ʋ 0)$!ǭ ƻ ǐ Ƽƻ Ǯ Ǯ ǐ /ʃǏƼ Ǯ
  13. • Splitting the data is a bad idea: • No

    estimates re how you split the data • Does not pool information • How about adding a dummy variable for Africa? The value of being rugged   */5&3"$5 0 1 2 3 4 5 6 6 7 8 9 rugged log(rgdppc_2000) Africa log(rgdppc_2000) 'ĶĴłĿIJ ƏƊ 4FQBSBUF MJOFBS SFHSFTTJPOT JO (%1 BHBJOTU UFSSBJO SVHHFEOFTT ćF TM OFHBUJWF PVUTJEF )PX DBO XF SFDPWFS UI DPNCJOFE EBUB ȃ (& '*" 1 -.$*) *! *0/*( ɠ'*"Ǭ"+ ʄǤ '*"ǭ ɠ-"++Ǭƽƻƻƻ Ǯ ȃ 3/-/ *0)/-$ . 2$/#  /  ʄǤ ǯ *(+' / Ǐ. .ǭɠ-"++ǬƽƻƻƻǮ ǐ ǰ   */5&3"$5*0/4 0 1 2 3 4 5 6 6 7 8 9 rugged log(rgdppc_2000) Africa 0 1 2 3 4 5 7 8 9 10 11 rugged log(rgdppc_2000) not Africa
  14. Dummy doesn’t work • Dummy variable for Africa: Figure 7.3

    UIF MJOF ćF GBDU UIBU "*$D UFMMT ZPV UIBU UIF NPEFM XJUI UIF EVNNZ UFS POMZ JOEJDBUFT UIBU "GSJDBO OBUJPOT PO BWFSBHF EP IBWF MPXFS (%1 BS JOUFSBDUJPO EPFT XPSL )PX DBO ZPV SFDPWFS UIF DIBOHF JO TMPQF PG UIJT TFDUJPO :PV OFFE B QSPQFS JOUFSBDUJPO FČFDU ćF NPEFM ZPV GPSN JT ZJ ∼ /PSNBM(µJ, σ) µJ = α + βS SJ + β" "J - Ǯƿƽƽƽǰ " JT ,+1Ǯ#/&  BOE S JT /2$$"! "T ZPVWF EPOF TJODF NPEFM JT CVJMU CZ SFQMBDJOH UIF QBSBNFUFS µ JO UIF UPQ MJOF UIF MJLFMJ RVBUJPO UIBU JT B GVODUJPO PG EBUB BOE OFX QBSBNFUFST TVDI BT α BOE BDUJPOT CZ FYUFOEJOH UIJT TUSBUFHZ /PX ZPV XBOU UP BMMPX UIF SFMB OE S UP WBSZ BT B GVODUJPO PG " 8JUIJO UIF NPEFM UIJT SFMBUJPOTIJQ JT QF βS 'PMMPXJOH UIF TBNF TUSBUFHZ PG SFQMBDJOH QBSBNFUFST XJUI MJOFBS BJHIUGPSXBSE XBZ UP NBLF βS EFQFOE VQPO " JT KVTU UP EFĕOF UIF TMPQF *UT XPSUI ĕUUJOH UIJT NPEFM UP QSPW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 4 5 6 6 7 8 9 10 11 Terrain Ruggedness Index log GDP year 2000 Africa not Africa (ǂǏƾ ǀƾDŽǏǁ ƽǏǂ ǁƾǏƼ ƻ ƼƾǏƽ
  15. Interaction • Need to allow effect of rugged to depend

    upon continent old direct effect of rugged linear effect of Africa on slope  */5&3"$5*0/4 B MJOFBS NPEFM JUTFMG POF UIBU JODMVEFT " ćJT BQQSPBDI SFTVMUT JO UIJT NPEFM ZJ ∼ /PSNBM(µJ, σ) >OLNH µJ = α + γJ SJ + β" "J >OLQHDUPRG γJ = βS + β"S "J >OLQHDUPRGHOR T UIF ĕSTU NPEFM XJUI UISFF FYQSFTTJPOT CVU JUT TUSVDUVSF JT UIF TBNF BT FWFSZ ( PEFM ZPVWF BMSFBEZ ĕU JO UIJT CPPL 4P ZPV EPOU OFFE UP MFBSO BOZ OFX USJD BUJOH UIJT NPEFM ćF USJDLT MJF FOUJSFMZ JO JOUFSQSFUJOH JU ćF ĕSTU MJOF BCPWF (BVTTJBO MJLFMJIPPE ZPVWF CFFO VTJOH TJODF $IBQUFS  ćF TFDPOE MJOF JT UIF PG BEEJUJWF EFĕOJUJPO PG µJ UIBU ZPVWF TFFO NBOZ UJNFT ćF UIJSE MJOF JT UIF OFX CJU ćF OFX TZNCPM γJ JT KVTU B QMBDFIPMEFS GPS UIF PO UIBU EFĕOFT UIF TMPQF CFUXFFO (%1 BOE SVHHFEOFTT 8F VTF iHBNNBw γ
  16. Interaction • Need to allow effect of rugged to depend

    upon continent  */5&3"$5*0/4 UTFMG POF UIBU JODMVEFT " ćJT BQQSPBDI SFTVMUT JO UIJT NPEFM ZJ ∼ /PSNBM(µJ, σ) >OLNHOLKRRG@ µJ = α + γJ SJ + β" "J >OLQHDUPRGHORI µ@ γJ = βS + β"S "J >OLQHDUPRGHORIVORSH@ M XJUI UISFF FYQSFTTJPOT CVU JUT TUSVDUVSF JT UIF TBNF BT FWFSZ (BVTT FBEZ ĕU JO UIJT CPPL 4P ZPV EPOU OFFE UP MFBSO BOZ OFX USJDLT GPS M ćF USJDLT MJF FOUJSFMZ JO JOUFSQSFUJOH JU ćF ĕSTU MJOF BCPWF JT UIF IPPE ZPVWF CFFO VTJOH TJODF $IBQUFS  ćF TFDPOE MJOF JT UIF TBNF OJUJPO PG µJ UIBU ZPVWF TFFO NBOZ UJNFT UIF OFX CJU ćF OFX TZNCPM γJ JT KVTU B QMBDFIPMEFS GPS UIF MJOFBS UIF TMPQF CFUXFFO (%1 BOE SVHHFEOFTT 8F VTF iHBNNBw γ IFSF .PEFM GBNJMZ *DŽǑǂ IBT BCPVU  PG UIF "*$DFTUJNBUFE NPEF TVQQPSU GPS JODMVEJOH UIF JOUFSBDUJPO FČFDU "OE OPUF UIBU %*$ TVMUT UP "*$D 8IZ #FDBVTF UIF QSJPST BSF ĘBU BOE UIFSFT NVD QBSBNFUFST 0WFSUIJOLJOH $POWFOUJPOBM GPSN PG JOUFSBDUJPO *OTUFBE PG B NPE NPEFM BT ZPV TBX BCPWF JUT DPOWFOUJPOBM UP NVMUJQMZ PVU BOZ JOUFSB POMZ POF MJOFBS NPEFM 'PS FYBNQMF UIF (%1 PO SVHHFEOFTT NPEFM ZJ ∼ /PSNBM(µJ, σ) µJ = α + βS SJ + β"S "J SJ + β" "J ćJT JT FRVJWBMFOU UP UIF GPSN JO UIF NBJO UFYU ćF FRVBUJPO GPS γ I UIF TFDPOE MJOF BOE FYQBOEFE ćJT FYQBOEFE GPSN BMTP XPSLT GPS FT *DŽǑǂ ʆǦ *-ǯ )&01ǯ ),$ǯ/$!-- Ǯƿƽƽƽǰ ʍ !+,/*ǯ *2 ǒ 0&$* ǰ ǒ *2 ʍ  ʀ /ǹ/2$$"! ʀ /ǹ/2$$"!ǹ ,+1Ǯ#/&  ʀ ǹ ,+1 ǰ ǒ !1ʅ!! ǒ
  17. Interaction β"S <  "GSJDBO OBUJPOT IBWF B NPSF OFHBUJWF

    TMPQF 'PS BOZ OBUJPO OPU JO "GSJDB "J =  BOE TP UIF JOUFS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POT MFUT VTF %*$ UP DPNQBSF UIJT OFX NPEFM UP UIF QSFWJPVT UXP 3 DPEF  *(+- ǭ (ǂǏƾ ǐ (ǂǏƿ ǐ (ǂǏǀ Ǯ   */5&3"$5*0/4 βS BT B MJOFBS NPEFM JUTFMG POF UIBU JODMVEFT " ćJT BQQSPBDI ZJ ∼ /PSNBM(µJ, σ) µJ = α + γJ SJ + β" "J γJ = βS + β"S "J ćJT JT UIF ĕSTU NPEFM XJUI UISFF FYQSFTTJPOT CVU JUT TUSVDUVS JBO NPEFM ZPVWF BMSFBEZ ĕU JO UIJT CPPL 4P ZPV EPOU OFFE FTUJNBUJOH UIJT NPEFM ćF USJDLT MJF FOUJSFMZ JO JOUFSQSFUJOH TBNF (BVTTJBO MJLFMJIPPE ZPVWF CFFO VTJOH TJODF $IBQUFS  LJOE PG BEEJUJWF EFĕOJUJPO PG µJ UIBU ZPVWF TFFO NBOZ UJNFT ćF UIJSE MJOF JT UIF OFX CJU ćF OFX TZNCPM γJ JT KVTU GVODUJPO UIBU EFĕOFT UIF TMPQF CFUXFFO (%1 BOE SVHHFEOFT CFDBVTF JU GPMMPXT iCFUBw β JO UIF (SFFL BMQIBCFU ćF FRVB BDUJPO CFUXFFO SVHHFEOFTT BOE "GSJDBO OBUJPOT *U JT B MJOF UIF FRVBUJPO γJ JT UIF FRVBUJPO GPS B MJOF
  18. Interpreting interaction β"S <  "GSJDBO OBUJPOT IBWF B NPSF

    OFHBUJWF TMPQF 'PS BOZ OBUJPO OPU JO "GSJDB "J =  BOE TP UIF JOUFSBDUJPO QBSBNFUFS β"S IBT OP FČFDU PO QSFEJDUJPO GPS UIBU OBUJPO 0G DPVSTF ZPV BSF HPJOH UP DPNQVUF UIF QPTUFSJPS EJTUSJCVUJPO GPS β"S GSPN UIF EBUB #VU PODF ZPV IBWF UIF QPTUFSJPS EJTUSJCVUJPO JU JT POMZ UISPVHI VOEFSTUBOEJOH XIFSF UIF QBSBNFUFS ĕUT JOUP ZPVS NPEF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OUFSQSFU UIF FTUJNBUFT BOE QMPUUJOH UIF QSFEJDUJPOT MFUT VTF %*$ UP DPNQBSF UIJT OFX NPEFM UP UIF QSFWJPVT UXP 3 DPEF  *(+- ǭ (ǂǏƾ ǐ (ǂǏƿ ǐ (ǂǏǀ Ǯ   +    2 $"#/   (ǂǏǀ ƿǁDŽǏǁ ǀǏƾ ƻǏƻ ƻǏDŽǂ ƼǀǏƼƾ  (ǂǏƿ ƿǂǁǏƿ ƿǏƿ ǁǏǃ ƻǏƻƾ ƼǀǏƾǀ ǁǏƽƽ (ǂǏƾ ǀƾDŽǏǂ ƽǏǃ ǂƻǏƼ ƻǏƻƻ ƼƾǏƾƼ ƼǀǏƽƽ .PEFM GBNJMZ (ǂǏǀ IBT BCPVU  PG UIF 8"*$FTUJNBUFE NPEFM XFJHIU ćBUT WFSZ TUSPOH TVQQPSU GPS JODMVEJOH UIF JOUFSBDUJPO FČFDU ćBU QSPCBCMZ JTOU TVSQSJTJOH HJWFO UIF PCWJ PVT EJČFSFODF JO TMPQF XF CFHBO UIJT TUPSZ XJUI #VU UIF NPEJDVN PG XFJHIU HJWFO UP (ǂǏƿ TVHHFTUT UIBU UIF QPTUFSJPS NFBOT GPS UIF TMPQFT JO (ǂǏǀ BSF B MJUUMF PWFSĕU "OE UIF TUBOEBSE FSSPS PG UIF EJČFSFODF JO 8"*$ CFUXFFO UIF UPQ UXP NPEFMT JT BMNPTU UIF TBNF BT UIF EJG GFSFODF JUTFMG ćFSF BSF POMZ TP NBOZ "GSJDBO DPVOUSJFT BęFS BMM TP UIF EBUB BSF TQBSTF BT GBS BT FTUJNBUJOH UIF JOUFSBDUJPO HPFT *NQPSUBOUMZ JUT OPU DMFBS XIBU JOGPSNBUJPO DSJUFSJB NFBO JO UIJT EBUB DPOUFYU 8F BSFOU TFSJPVTMZ JNBHJOJOH UIBU XF XJMM SFTBNQMF GSPN TPNF QSPDFTT UIBU DSFBUFE "GSJDBO OBUJPOT BOE OPO"GSJDBO OBUJPOT 4P EP JOGPSNBUJPO DSJUFSJB NBLF TFOTF BU BMM IFSF * UIJOL UIFZ EP CVU SFBTPOBCMF QFPQMF DBO EJTBHSFF PO UIJT QPJOU )FSFT BO BSHVNFOU GPS IPX UIFJS BEWJDF BCPVU PWFSĕUUJOH JT SFMFWBOU FWFO XIFO UIF USBJOUFTU QBSBEJHN CFIJOE JOGPSNBUJPO DSJUFSJB DBOOPU CF VOEFSTUPPE MJUFSBMMZ 'JSTU OP NBUUFS XIBU ZPV XBOU UP EP XJUI UIF FTUJNBUFT QSPEVDFE CZ B NPEFM UIF FT UJNBUFT NVTU CF PWFSĕU ćFZ NVTU CF PWFSĕU CFDBVTF OPU FWFSZ GFBUVSF PG UIF TBNQMF JT m7.3 m7.4 m7.5 460 480 500 520 540 deviance WAIC
  20. Plotting interaction  #6*-%*/( "/ */5&3"$5*0/  0 1 2

    3 4 5 6 6 7 8 9 Terrain Ruggedness Index log GDP year 2000 African nations 0 1 2 3 4 5 7 8 9 10 11 Terrain Ruggedness Index log GDP year 2000 Non-African nations 'ĶĴłĿIJ Əƌ 1PTUFSJPS QSFEJDUJPOT GPS UIF UFSSBJO SVHHFEOFTT NPEFM JODMVE JOH UIF JOUFSBDUJPO CFUXFFO "GSJDB BOE SVHHFEOFTT Figure 7.4
  21. Interpreting interactions • Is hard • Add interaction => other

    parameters change meaning • Influence of predictor depends upon multiple parameters and their covariation FBDI DPFďDJFOU TBZT IPX NVDI UIF BWFSBHF PVUDPNF µ DIBOHFT XIFO UIF QSFEJDUPS DIBOHFT CZ POF VOJU "OE TJODF BMM PG UIF QBSBNFUFST IBWF JOEFQFOEFOU JOĘVFODFT PO UIF PVUDPNF UIFSFT OP USPVCMF JO JOUFSQSFUJOH FBDI QBSBNFUFS TFQBSBUFMZ &BDI TMPQF QBSBNFUFS HJWFT VT B EJSFDU NFBTVSF PG FBDI QSFEJDUPS WBSJBCMFT JOĘVFODF *OUFSBDUJPO NPEFMT SVJO UIJT QBSBEJTF IPXFWFS -PPL BU UIF JOUFSBDUJPO MJLFMJIPPE BHBJO ZJ ∼ /PSNBM(µJ, σ) >OLNHOLKRRG@ µJ = α + γJ SJ + β" "J >OLQHDUPRGHORI µ@ γJ = βS + β"S "J >OLQHDUPRGHORIVORSH@ /PX UIF DIBOHF JO µJ UIBU SFTVMUT GSPN B VOJU DIBOHF JO SJ JT HJWFO CZ γJ  "OE TJODF γJ JT B GVODUJPO PG UISFF UIJOHT‰βS β"S BOE "J ‰XF IBWF UP LOPX BMM UISFF JO PSEFS UP LOPX UIF JOĘVFODF PG SJ PO UIF PVUDPNF ćF POMZ UJNF UIF TMPQF βS IBT JUT PME NFBOJOH JT XIFO "J =  XIJDI NBLFT γJ = βS  0UIFSXJTF UP DPNQVUF UIF JOĘVFODF PG SJ PO UIF PVUDPNF XF IBWF UP TJNVMUBOFPVTMZ DPOTJEFS UXP QBSBNFUFST BOE BOPUIFS QSFEJDUPS WBSJBCMF ćF QSBDUJDBM JNQMJDBUJPO PG UIJT GBDU JT UIBU ZPV DBO OP MPOHFS SFBE UIF JOĘVFODF PG FJUIFS QSFEJDUPS GSPN UIF UBCMF PG FTUJNBUFT )FSF BSF UIF QBSBNFUFS FTUJNBUFT 3 DPEF  +- $.ǭ(ǂǏǀǮ  ) / 1 ƽǏǀɳ DŽǂǏǀɳ  DŽǏƼǃ ƻǏƼƿ ǃǏDŽƽ DŽǏƿǀ - ǤƻǏƼǃ ƻǏƻǃ ǤƻǏƾƾ ǤƻǏƻƿ  ǤƼǏǃǀ ƻǏƽƽ ǤƽǏƽǂ ǤƼǏƿƽ - ƻǏƾǀ ƻǏƼƾ ƻǏƼƻ ƻǏǁƻ .$"( ƻǏDŽƾ ƻǏƻǀ ƻǏǃƾ ƼǏƻƾ 4JODF γ "(( EPFTOU BQQFBS JO UIJT UBCMF‰JU XBTOU FTUJNBUFE‰XF IBWF UP DPNQVUF JU PVSTFMWFT *UT FBTZ FOPVHI UP EP UIBU BU UIF ."1 WBMVFT QPTUFSJPS NFBOT  'PS FYBNQMF UIF ."1 TMPQF SFMBUJOH SVHHFEOFTT UP MPH(%1 XJUIJO "GSJDB JT
  22. Interpreting interactions UJPOT FBDI DPFďDJFOU TBZT IPX NVDI UIF BWFSBHF

    PVUDPNF µ UPS DIBOHFT CZ POF VOJU "OE TJODF BMM PG UIF QBSBNFUFST IB PO UIF PVUDPNF UIFSFT OP USPVCMF JO JOUFSQSFUJOH FBDI QBSBN QBSBNFUFS HJWFT VT B EJSFDU NFBTVSF PG FBDI QSFEJDUPS WBSJBCMF *OUFSBDUJPO NPEFMT SVJO UIJT QBSBEJTF IPXFWFS -PPL BU UI ZJ ∼ /PSNBM(µJ, σ) µJ = α + γJ SJ + β" "J γJ = βS + β"S "J /PX UIF DIBOHF JO µJ UIBU SFTVMUT GSPN B VOJU DIBOHF JO SJ JT H B GVODUJPO PG UISFF UIJOHT‰βS β"S BOE "J‰XF IBWF UP LOPX UIF JOĘVFODF PG SJ PO UIF PVUDPNF ćF POMZ UJNF UIF TMPQF βS I "J =  XIJDI NBLFT γJ = βS 0UIFSXJTF UP DPNQVUF UIF JOĘV XF IBWF UP TJNVMUBOFPVTMZ DPOTJEFS UXP QBSBNFUFST BOE BOPUI ćF QSBDUJDBM JNQMJDBUJPO PG UIJT GBDU JT UIBU ZPV DBO OP MP FJUIFS QSFEJDUPS GSPN UIF UBCMF PG FTUJNBUFT )FSF BSF UIF QBSBN Where’s gamma? In Africa:   */5&3"$5*0/4 EF  -/" &0ǯ*DŽǑǂǰ 01&*1" ǑǑ ƿǑǂɵ džDŽǑǂɵ  džǑƿƿ ƽǑƾǁ DžǑdžǂ džǑǁdž / ǦƽǑƿƽ ƽǑƽDž ǦƽǑǀǂ ǦƽǑƽǂ  ǦƾǑdžǂ ƽǑƿƿ ǦƿǑǀdž ǦƾǑǂƾ / ƽǑǀdž ƽǑƾǀ ƽǑƾǁ ƽǑǃǂ 0&$* ƽǑdžǀ ƽǑƽǂ ƽǑDžǀ ƾǑƽǀ 4JODF γ $** EPFTOU BQQFBS JO UIJT UBCMF‰JU XBTOU FTUJNBUFE‰XF IBWF UP DPNQVU PVSTFMWFT *UT FBTZ FOPVHI UP EP UIBU BU UIF ."1 FTUJNBUFT 'PS FYBNQMF UIF TMPQF SFMBU SVHHFEOFTT UP MPH(%1 XJUIJO "GSJDB JT γ = βS + β"S() = −. + . = . "OE PVUTJEF PG "GSJDB γ = βS + β"S() = −. 4P UIF SFMBUJPOTIJQ CFUXFFO SVHHFEOFTT BOE MPH(%1 JT FTTFOUJBMMZ SFWFSTFE JOTJEF B PVUTJEF PG "GSJDB  *ODPSQPSBUJOH VODFSUBJOUZ #VU UIBUT POMZ BU UIF ."1 FTUJNBUFT 5P HFU TP Outside Africa:   */5&3"$5*0/4 " &0ǯ*DŽǑǂǰ 01&*1" ǑǑ ƿǑǂɵ džDŽǑǂɵ džǑƿƿ ƽǑƾǁ DžǑdžǂ džǑǁdž ǦƽǑƿƽ ƽǑƽDž ǦƽǑǀǂ ǦƽǑƽǂ ǦƾǑdžǂ ƽǑƿƿ ǦƿǑǀdž ǦƾǑǂƾ / ƽǑǀdž ƽǑƾǀ ƽǑƾǁ ƽǑǃǂ $* ƽǑdžǀ ƽǑƽǂ ƽǑDžǀ ƾǑƽǀ ODF γ $** EPFTOU BQQFBS JO UIJT UBCMF‰JU XBTOU FTUJNBUFE‰XF IBWF UP DPNQVUF JU STFMWFT *UT FBTZ FOPVHI UP EP UIBU BU UIF ."1 FTUJNBUFT 'PS FYBNQMF UIF TMPQF SFMBUJOH HHFEOFTT UP MPH(%1 XJUIJO "GSJDB JT γ = βS + β"S() = −. + . = . OE PVUTJEF PG "GSJDB γ = βS + β"S() = −. UIF SFMBUJPOTIJQ CFUXFFO SVHHFEOFTT BOE MPH(%1 JT FTTFOUJBMMZ SFWFSTFE JOTJEF BOE UTJEF PG "GSJDB  *ODPSQPSBUJOH VODFSUBJOUZ #VU UIBUT POMZ BU UIF ."1 FTUJNBUFT 5P HFU TPNF GVODUJPO PG UISFF UIJOHT‰βS β"S BOE "J ‰XF IBWF UP LOPX BMM UISFF JO PSEFS UP LOPX UIF JOĘVFODF PG SJ PO UIF PVUDPNF ćF POMZ UJNF UIF TMPQF βS IBT JUT PME NFBOJOH JT XIFO "J =  XIJDI NBLFT γJ = βS  0UIFSXJTF UP DPNQVUF UIF JOĘVFODF PG SJ PO UIF PVUDPNF XF IBWF UP TJNVMUBOFPVTMZ DPOTJEFS UXP QBSBNFUFST BOE BOPUIFS QSFEJDUPS WBSJBCMF ćF QSBDUJDBM JNQMJDBUJPO PG UIJT GBDU JT UIBU ZPV DBO OP MPOHFS SFBE UIF JOĘVFODF PG FJUIFS QSFEJDUPS GSPN UIF UBCMF PG FTUJNBUFT )FSF BSF UIF QBSBNFUFS FTUJNBUFT 3 DPEF  +- $.ǭ(ǂǏǀǮ  ) / 1 ƽǏǀɳ DŽǂǏǀɳ  DŽǏƼǃ ƻǏƼƿ ǃǏDŽƽ DŽǏƿǀ - ǤƻǏƼǃ ƻǏƻǃ ǤƻǏƾƾ ǤƻǏƻƿ  ǤƼǏǃǀ ƻǏƽƽ ǤƽǏƽǂ ǤƼǏƿƽ - ƻǏƾǀ ƻǏƼƾ ƻǏƼƻ ƻǏǁƻ .$"( ƻǏDŽƾ ƻǏƻǀ ƻǏǃƾ ƼǏƻƾ 4JODF γ "(( EPFTOU BQQFBS JO UIJT UBCMF‰JU XBTOU FTUJNBUFE‰XF IBWF UP DPNQVUF JU PVSTFMWFT *UT FBTZ FOPVHI UP EP UIBU BU UIF ."1 WBMVFT QPTUFSJPS NFBOT  'PS FYBNQMF UIF ."1 TMPQF SFMBUJOH SVHHFEOFTT UP MPH(%1 XJUIJO "GSJDB JT γ = βS + β"S() = −. + . = . "OE PVUTJEF PG "GSJDB γ = βS + β"S() = −. 4P UIF SFMBUJPOTIJQ CFUXFFO SVHHFEOFTT BOE MPH(%1 JT FTTFOUJBMMZ SFWFSTFE JOTJEF BOE PVU TJEF PG "GSJDB  *ODPSQPSBUJOH VODFSUBJOUZ #VU UIBUT POMZ BU UIF ."1 WBMVFT 5P HFU TPNF JEFB PG UIF VODFSUBJOUZ BSPVOE UIPTF γ WBMVFT XFMM OFFE UP VTF UIF XIPMF QPTUFSJPS 4JODF γ
  23. Interpreting interactions • Need uncertainty as well • Sample from

    posterior • Compute posterior distribution of gamma gamma.Africa gamma.notAfrica Figure 7.5 -0.4 -0.2 0.0 0.2 0.4 0.6 0 1 2 gamma 'ĶĴłĿIJ Əƍ 1PTUFSJPS EJTUSJCVUJPOT PG UIF TMPQF SFMBUJOH UFSSBJO SVHHFEOFTT UP MPH(%1 #MVF "GSJDBO OBUJPOT #MBDL OPO"GSJDBO OBUJPOT 3 DPEF  +*./ ʄǤ 3/-/Ǐ.(+' .ǭ (ǂǏǀ Ǯ "((Ǐ!-$ ʄǤ +*./ɠ- ɾ +*./ɠ-ǷƼ "((Ǐ)*/!-$ ʄǤ +*./ɠ- ɾ +*./ɠ-Ƿƻ ćF TZNCPMT "((Ǐ!-$ BOE "((Ǐ)*/!-$ OPX IPME TBNQMFT GSPN UIF QPTUFSJPS EJTUSJCVUJPOT PG γ XJUIJO "GSJDB BOE γ PVUTJEF "GSJDB SFTQFDUJWFMZ ćF NFBOT PG UIFTF EJT USJCVUJPOT BSF KVTU MJLF UIF DBMDVMBUJPOT XF EJE BU UIF FOE PG UIF QSFWJPVT TFDUJPO 3 DPEF  ( )ǭ "((Ǐ!-$Ǯ ( )ǭ "((Ǐ)*/!-$ Ǯ ǯƼǰ ƻǏƼǁƾƼǁǀƾ ǯƼǰ ǤƻǏƼǃƽƿǀƿǂ /FBSMZ JEFOUJDBM UP UIF ."1 WBMVFT #VU OPU XF BMTP IBWF GVMM EJTUSJCVUJPOT PG UIF TMPQFT XJUIJO BOE PVUTJEF PG "GSJDB -FUT QMPU UIFN PO UIF TBNF BYJT TP XF DBO TFF UIFJS PWFSMBQ DMFBSMZ -0.4 -0.2 0.0 0.2 0.4 0.6 0 1 2 3 4 5 gamma Density
  24. Interpreting interactions • Need uncertainty as well • Sample from

    posterior • Compute posterior distribution of gamma gamma.Africa gamma.notAfrica Figure 7.5 -0.4 -0.2 0.0 0.2 0.4 0.6 0 1 2 gamma 'ĶĴłĿIJ Əƍ 1PTUFSJPS EJTUSJCVUJPOT PG UIF TMPQF SFMBUJOH UFSSBJO SVHHFEOFTT UP MPH(%1 #MVF "GSJDBO OBUJPOT #MBDL OPO"GSJDBO OBUJPOT 3 DPEF  +*./ ʄǤ 3/-/Ǐ.(+' .ǭ (ǂǏǀ Ǯ "((Ǐ!-$ ʄǤ +*./ɠ- ɾ +*./ɠ-ǷƼ "((Ǐ)*/!-$ ʄǤ +*./ɠ- ɾ +*./ɠ-Ƿƻ ćF TZNCPMT "((Ǐ!-$ BOE "((Ǐ)*/!-$ OPX IPME TBNQMFT GSPN UIF QPTUFSJPS EJTUSJCVUJPOT PG γ XJUIJO "GSJDB BOE γ PVUTJEF "GSJDB SFTQFDUJWFMZ ćF NFBOT PG UIFTF EJT USJCVUJPOT BSF KVTU MJLF UIF DBMDVMBUJPOT XF EJE BU UIF FOE PG UIF QSFWJPVT TFDUJPO 3 DPEF  ( )ǭ "((Ǐ!-$Ǯ ( )ǭ "((Ǐ)*/!-$ Ǯ ǯƼǰ ƻǏƼǁƾƼǁǀƾ ǯƼǰ ǤƻǏƼǃƽƿǀƿǂ /FBSMZ JEFOUJDBM UP UIF ."1 WBMVFT #VU OPU XF BMTP IBWF GVMM EJTUSJCVUJPOT PG UIF TMPQFT XJUIJO BOE PVUTJEF PG "GSJDB -FUT QMPU UIFN PO UIF TBNF BYJT TP XF DBO TFF UIFJS PWFSMBQ DMFBSMZ -0.4 -0.2 0.0 0.2 0.4 0.6 0 1 2 3 4 5 gamma Density difference
  25. Anatomy of an interaction • Linear interactions are bidirectional •

    If effect of ruggedness depends upon continent, then... • ...effect of continent also depends upon ruggedness 8IJMF UIFTF UXP QPTTJCJMJUJFT TPVOE EJČFSFOU UP NPTU IVNBOT ZPVS HPMFN UIJOLT UIFZ BSF EFOUJDBM *O UIJT TFDUJPO XFMM FYBNJOF UIJT GBDU BOBMZUJDBMMZ ćFO XFMM QMPU UIF SVHHFEOFTT BOE (%1 FYBNQMF BHBJO CVU XJUI UIF SFWFSTF QISBTJOH‰UIF JOĘVFODF PG "GSJDB EFQFOET VQPO VHHFEOFTT  #VSJEBOT JOUFSBDUJPO $POTJEFS ZFU BHBJO UIF NBUIFNBUJDBM GPSN PG UIF NPEFM ZJ ∼ /PSNBM(µJ, σ) >OLNHOLKRRG µJ = α + γJ SJ + β" "J >OLQHDUPRGHORI µ γJ = βS + β"S "J >OLQHDUPRGHORIVORSH -FUT FYQBOE γ JOUP UIF FYQSFTTJPO GPS µ µJ = α + (βS + β"S "J)SJ + β" "J = α + βS SJ + β"S "J SJ + β" "J /PX GBDUPS UPHFUIFS UIF UFSNT XJUI "J JO UIFN µJ = α + βS SJ + (β" + β"S SJ) ( "J ćF UFSN MBCFMFE ( BCPWF MPPLT B MPU MJLF γ JO UIF PSJHJOBM GPSN ćJT JT UIF TBNF NPEFM PG µ CVU SFFYQSFTTFE TP UIBU UIF MJOFBS JOUFSBDUJPO BQQMJFT UP " ćF QPJOU PG UIF BMHFCSB BCPWF JT UP QSPWF UIBU MJOFBS JOUFSBDUJPOT BSF TZNNFUSJD KVTU EFOUJDBM *O UIJT TFDUJPO XFMM FYBNJOF UIJT GBDU BOBMZUJDBMMZ ćFO XFMM QMPU UIF SVHHFEOFTT BOE (%1 FYBNQMF BHBJO CVU XJUI UIF SFWFSTF QISBTJOH‰UIF JOĘVFODF PG "GSJDB EFQFOET VQPO VHHFEOFTT  #VSJEBOT JOUFSBDUJPO $POTJEFS ZFU BHBJO UIF NBUIFNBUJDBM GPSN PG UIF NPEFM ZJ ∼ /PSNBM(µJ, σ) >OLNHOLKRRG µJ = α + γJ SJ + β" "J >OLQHDUPRGHORI µ γJ = βS + β"S "J >OLQHDUPRGHORIVORSH FUT FYQBOE γ JOUP UIF FYQSFTTJPO GPS µ µJ = α + (βS + β"S "J)SJ + β" "J = α + βS SJ + β"S "J SJ + β" "J /PX GBDUPS UPHFUIFS UIF UFSNT XJUI "J JO UIFN µJ = α + βS SJ + (β" + β"S SJ) ( "J ćF UFSN MBCFMFE ( BCPWF MPPLT B MPU MJLF γ JO UIF PSJHJOBM GPSN ćJT JT UIF TBNF NPEF G µ CVU SFFYQSFTTFE TP UIBU UIF MJOFBS JOUFSBDUJPO BQQMJFT UP " ćF QPJOU PG UIF BMHFCSB BCPWF JT UP QSPWF UIBU MJOFBS JOUFSBDUJPOT BSF TZNNFUSJD KVTU LF UIF DIPJDF GBDJOH #VSJEBOT BTT 8JUIJO UIF NPEFM UIFSFT CBTJT UP QSFGFS POF JOUFS
  26. 0 1 5 6 7 8 9 10 12 African

    nation (indicator) log GDP year 2000 rugged = 0.003 0 1 5 6 7 8 9 10 12 African nation (indicator) log GDP year 2000 rugged = 3 0 1 5 6 7 8 9 10 12 African nation (indicator) log GDP year 2000 rugged = 6 Effect of being in Africa depends upon ruggedness
  27. 0 1 5 6 7 8 9 10 12 African

    nation (indicator) log GDP year 2000 rugged = 0.003 0 1 5 6 7 8 9 10 12 African nation (indicator) log GDP year 2000 rugged = 3 0 1 5 6 7 8 9 10 12 African nation (indicator) log GDP year 2000 rugged = 6  #6*-%*/( "/ */5&3"$5*0/  0 1 2 3 4 5 6 6 7 8 9 Terrain Ruggedness Index log GDP year 2000 African nations Equatorial Guinea Lesotho Seychelles 0 1 2 3 4 5 7 8 9 10 11 Terrain Ruggedness Index log GDP year 2000 Non-African nations Switzerland Yemen
  28. Tulip blooms • 27 replicate blooms across three levels of

    both water and shade blooms 1.0 2.0 3.0 0 100 300 1.0 2.0 3.0 water 0 100 300 1.0 2.0 3.0 1.0 2.0 3.0 shade
  29. Tulip blooms ćF VODFOUFSFE NPEFMT 8IJMF B DPNQMFUF NPEFM BWFSBHJOH

    BOBMZTJT JT QPTTJCMF HPJOH TJNQMJGZ UIF TUPSZ CZ GPDVTJOH PO KVTU UXP NPEFMT  UIF NPEFM XJUI - BOE .# CVU OP JOUFSBDUJPO BOE  UIF NPEFM XJUI CPUI NBJO FČFDUT BOE BDUJPO PG 2/ - XJUI .#  * EP TP KVTU GPS UIF TBLF PG CSFWJUZ :PV DBO ĕU UIF NPEFMT MJLF UIPTF XJUI POMZ POF PG UIF UXP QSFEJDUPS WBSJBCMFT BOE EFNPOTUSBUF FMG UIBU UIF DPODMVTJPOT EPOU TVCTUBOUJBMMZ DIBOHF NBJO FČFDU NPEFM JT BTTVNJOH OBJWF ĘBU QSJPST  #J ∼ /PSNBM(µJ, σ) µJ = α + βX XJ + βT TJ GVMM JOUFSBDUJPO NPEFM JT BMTP BTTVNJOH OBJWF ĘBU QSJPST  #J ∼ /PSNBM(µJ, σ) µJ = α + βX XJ + βT TJ + βXT XJ TJ JT UIF WBMVF PG '**( PO SPX J XJ JT UIF WBMVF PG 2/ - BOE TJ JT UIF WBMVF PG N MFBWJOH UIF DBUFHPSJDBM WBSJBCMF   PVU PG UIJT BOBMZTJT CVU * BDUVBMMZ UIJOL B OBMZTJT SFRVJSFT JU ćF QPJOUT * XJTI UP NBLF EPOU EFQFOE VQPO JU IPXFWFS OH UIF NPEFMT XJUI (+ JT KVTU BT ZPV NJHIU FYQFDU 3 DPEF  (+ǭ ǭ '**(. ʋ )*-(ǭ (0 ǐ .$"( Ǯ ǐ (0 ʋ  ɾ 2Ƿ2/ - ɾ .Ƿ.# E NFDIBOJTUJD NPEFM PG UIF JOUFSBDUJPO POF UIBU VTFT B UIFPSZ BCPVU UIF QMBOUT QIZT HZ UP IZQPUIFTJ[F UIF GVODUJPOBM SFMBUJPOTIJQ CFUXFFO MJHIU BOE XBUFS UIFO B TJNQMF BS UXPXBZ JOUFSBDUJPO JT B HPPE TUBSU  ćF VODFOUFSFE NPEFMT 8IJMF B DPNQMFUF NPEFM BWFSBHJOH BOBMZTJT JT QPTTJCMF *N HPJOH TJNQMJGZ UIF TUPSZ CZ GPDVTJOH PO KVTU UXP NPEFMT  UIF NPEFM XJUI I 2/ - BOE .# CVU OP JOUFSBDUJPO BOE  UIF NPEFM XJUI CPUI NBJO FČFDUT BOE OUFSBDUJPO PG 2/ - XJUI .#  * EP TP KVTU GPS UIF TBLF PG CSFWJUZ :PV DBO ĕU UIF JOH NPEFMT MJLF UIPTF XJUI POMZ POF PG UIF UXP QSFEJDUPS WBSJBCMFT BOE EFNPOTUSBUF ZPVSTFMG UIBU UIF DPODMVTJPOT EPOU TVCTUBOUJBMMZ DIBOHF ćF NBJO FČFDU NPEFM JT BTTVNJOH OBJWF ĘBU QSJPST  #J ∼ /PSNBM(µJ, σ) µJ = α + βX XJ + βT TJ UIF GVMM JOUFSBDUJPO NPEFM JT BMTP BTTVNJOH OBJWF ĘBU QSJPST  #J ∼ /PSNBM(µJ, σ) µJ = α + βX XJ + βT TJ + βXT XJ TJ SF #J JT UIF WBMVF PG '**( PO SPX J XJ JT UIF WBMVF PG 2/ - BOE TJ JT UIF WBMVF PG   *N MFBWJOH UIF DBUFHPSJDBM WBSJBCMF   PVU PG UIJT BOBMZTJT CVU * BDUVBMMZ UIJOL B FSF BOBMZTJT SFRVJSFT JU ćF QPJOUT * XJTI UP NBLF EPOU EFQFOE VQPO JU IPXFWFS 'JUUJOH UIF NPEFMT XJUI (+ JT KVTU BT ZPV NJHIU FYQFDU 3 DPEF  ʄǤ (+ǭ '$./ǭ No interaction: water and shade have independent effects Interaction: water and shade have interdependent effects
  30.   */5&3"$5*0/4  ʋ )*-(ǭ ƻ ǐ Ƽƻƻ Ǯ

    ǐ 2 ʋ )*-(ǭ ƻ ǐ Ƽƻƻ Ǯ ǐ . ʋ )*-(ǭ ƻ ǐ Ƽƻƻ Ǯ ǐ 2. ʋ )*-(ǭ ƻ ǐ Ƽƻƻ Ǯ ǐ .$"( ʋ 0)$!ǭ ƻ ǐ Ƽƻƻ Ǯ Ǯ ǐ /ʃ ǐ ( /#*ʃǙ ' -Ǥ Ǚ ǐ *)/-*'ʃ'$./ǭ(3$/ʃƼ ƿǮ Ǯ /P BOHSZ XBSOJOHT BOZNPSF 4P MFUT MPPL BU UIF FTUJNBUFT 3 DPEF  * !/ǭ(ǂǏǁǐ(ǂǏǂǮ (ǂǏǁ (ǂǏǂ  ǀƾǏƿǁ ǤǃƿǏƿǂ 2 ǂǁǏƾǁ ƼǀƼǏƼǁ . ǤƾǃǏDŽƽ ƾǀǏƼƾ .$"( ǀǂǏƿƻ ƿǁǏƽǀ 2.  ǤƾDŽǏǁǂ )*. ƽǂ ƽǂ /PX DPOTJEFS UIFTF FTUJNBUFT BOE USZ UP ĕHVSF PVU XIBU UIF NPEFMT BSF UFMMJOH VT BCPVU UIF JOĘVFODF PG XBUFS BOE TIBEF PO UIF CMPPNT 'JSTU DPOTJEFS UIF JOUFSDFQUT  α ćF FTUJNBUF Tulip blooms • Estimates gone wild! Intercept completely different Influence of shade changes direction? Interaction negative? /PX DPOTJEFS UIF TMPQF QBSBNFUFST *O UIF NBJOFČFDUPOMZ NPEFM (ǂǏǁ UIF ."1 WBMVF GPS UIF NBJO FČFDU PG 2/ - JT QPTJUJWF BOE UIF NBJO FČFDU GPS .# JT OFHBUJWF 5BLF B MPPL BU UIF TUBOEBSE EFWJBUJPOT BOE JOUFSWBMT JO +- $.ǭ(ǂǏǁǮ UP WFSJGZ UIBU CPUI QPTUFSJPS EJTUSJCVUJPOT BSF SFMJBCMZ PO POF TJEF PG [FSP :PV NJHIU JOGFS UIBU UIFTF QPTUFSJPS EJTUSJCV UJPOT TVHHFTU UIBU XBUFS JODSFBTFT CMPPNT XIJMF TIBEF SFEVDFT UIFN 'PS FWFSZ BEEJUJPOBM MFWFM PG TPJM NPJTUVSF CMPPNT JODSFBTF CZ  PO BWFSBHF 'PS FWFSZ BEEJUJPO VOJU PG TIBEF CMPPNT EFDSFBTF CZ  PO BWFSBHF ćPTF TPVOE SFBTPOBCMF #VU UIF BOBMPHPVT QPTUFSJPS EJTUSJCVUJPOT GSPN UIF JOUFSBDUJPO NPEFM (ǂǏǂ BSF RVJUF EJČFSFOU 'JSTU BTTVSF ZPVSTFMG UIBU UIF JOUFSBDUJPO NPEFM JT JOEFFE B NVDI CFUUFS NPEFM 3 DPEF  *(+- ǭ (ǂǏǁ ǐ (ǂǏǂ Ǯ   +    2 $"#/   (ǂǏǂ ƽDŽǁǏƾ ǁǏƽƽ ƻǏƻƻ ƻǏDŽDŽ ǀǏƻǀ  (ǂǏǁ ƾƻǁǏƾ ǀǏǀƼ ƼƻǏƻƼ ƻǏƻƼ ƿǏǁƿ ƾǏƻƽ ćJT DPNQBSJTPO BTTJHOT OFBSMZ BMM PG UIF XFJHIU PG FWJEFODF UP (ǂǏǂ 4P MFUT DPOTJEFS UIF QPTUFSJPS EJTUSJCVUJPO GSPN (ǂǏǂ /PX CPUI NBJO FČFDUT BSF QPTJUJWF CVU UIF OFX JOUFSBDUJPO QPTUFSJPS NFBO JT OFHBUJWF "SF ZPV UP DPODMVEF OPX UIBU UIF NBJO FČFDU PG TIBEF JT UP IFMQ m7.6 m7.7 285 290 295 300 305 310 315 deviance WAIC