L19 Statistical Rethinking Winter 2019

L19 Statistical Rethinking Winter 2019

Lecture 19 of the Dec 2018 through March 2019 edition of Statistical Rethinking. Covers end of Chapter 14, Gaussian processes.

A0f2f64b2e58f3bfa48296fb9ed73853?s=128

Richard McElreath

February 25, 2019
Tweet

Transcript

  1. Gaussian Processes Statistical Rethinking Winter 2019 Lecture 19 / Week

    10
  2. 2000 2004 2008 2012 80 er Elections Birth Year Republican

    Vote 2000 2004 2008 2012 1990 1970 1950 1930 0.3 0.4 0.5 0.6 0.7 Lining up by Birth Year Republican Vote 2008 McCain Vote 20 40 60 80 0.3 0.4 0.5 0.6 0.7 Republican Vote
  3. 00 04 08 12 Birth Year Republican Vote 2000 2004

    2008 2012 1990 1970 1950 1930 0.3 0.4 0.5 0.6 0.7 Lining up by Birth Year VIOMIVLXZM[QLMV\QIT^W\QVOXZMN  <PMZMTI\QWV[PQXQ[KTMIZTaVWV \QKZMTI\QWV[PQX \PMK]Z^MKPIVOM[ V[I[_MTT \PW]OPVWKTMIZXI\\MZV Age Age−Specific Weights (w) • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• •• • • • •• •• • • • •••• • •••• • • •• • • • • • • • • • Posterior Mean 50% C.I. 95% C.I. 18 10 20 30 40 50 60 70 −0.01 0.00 0.01 0.02 0.03 0.04 .QO]ZM " -[\QUI\M[NWZ\PMOMVMZI\QWVITI[XMK\[WN  JMWN XIZIUW]V\QUXWZ\IVKMQV\PMNWZUI\QWVWN TWVO ^MZaaW]VOIOMPI^M^MZaTQ\\TMQUXIK\ IVLIN\MZ\PMIO UIOVQ\]LMNZWUIJW]\\PMIOMWN WV_IZL : < QUXTQMLJa\PMU IZM[]J[\IV\QITTaUWZMQUXWZ\IV\NWZ Republican Vote Age 2008 McCain Vote 20 40 60 80 0.3 0.4 0.5 0.6 0. Age Republican Vote 20 40 6 0.3 0.4 0.5 0.6 0. .QO]ZM " :I_LI\IIVL47-;; K]Z^M[ QVLQKI\QVO\PMZMTI <PM/ZMI\;WKQM\a :MIOIV¼[:M^WT]\QWV IVL /MVMZI\QWV[WN8ZM[QLMV\QIT>W\QVO AIQZ/PQ\bI )VLZM_/MTUIV‡ 2]Ta 
  4. Continuous categories • Traditional clusters discrete, unordered => every category

    equally different from all others (in prior) • Continuous dimensions of difference: • Age, income, location, phylogenetic distance, social network distance, many others • No obvious cut points in continuum, but close values share common exposures/covariates/interactions • Would like to exploit pooling in these cases as well • Common approach: Gaussian process regression
  5. Spatial autocorrelation • Relationship between tool complexity and population •

    Close societies may share tools because of contact or similar geology/ecology • Use space as proxy • Spatial autocorrelation
  6. -FUT CFHJO CZ MPBEJOH UIF EBUB BOE JOTQFDUJOH UIF HFPHSBQIJD

    EJTUBODF NBUSJY *WF BM SFBEZ HPOF BIFBE BOE MPPLFE VQ UIF BTUIFDSPXĘJFT OBWJHBUJPO EJTUBODF CFUXFFO FBDI QBJS PG TPDJFUJFT ćFTF EJTUBODFT BSF NFBTVSFE JO UIPVTBOET PG LJMPNFUFST BOE UIF NBUSJY PG UIFN JT JO UIF - /#$)&$)" QBDLBHF EF  ȕ '* /# $./) (/-$3 '$--4ǿ- /#$)&$)"Ȁ /ǿ$.').$.//-$3Ȁ ȕ $.+'4 ȕ .#*-/ *'0() )( .Ǣ .* !$/. *) .- ) (/ ʚǶ $.').$.//-$3 *')( .ǿ(/Ȁ ʚǶ ǿǫ'ǫǢǫ$ǫǢǫǫǢǫǫǢǫ$ǫǢǫ-ǫǢǫ#ǫǢǫ)ǫǢǫ*ǫǢǫ ǫȀ -*0)ǿ(/ǢǎȀ ' $   $ - # ) *  ' &0' ǍǡǍ Ǎǡǒ ǍǡǓ ǑǡǑ ǎǡǏ ǏǡǍ ǐǡǏ ǏǡǕ ǎǡǖ ǒǡǔ $&*+$ Ǎǡǒ ǍǡǍ Ǎǡǐ ǑǡǏ ǎǡǏ ǏǡǍ Ǐǡǖ Ǐǡǔ ǏǡǍ ǒǡǐ )/ -05 ǍǡǓ Ǎǡǐ ǍǡǍ ǐǡǖ ǎǡǓ ǎǡǔ ǏǡǓ ǏǡǑ Ǐǡǐ ǒǡǑ + ǑǡǑ ǑǡǏ ǐǡǖ ǍǡǍ ǒǡǑ Ǐǡǒ ǎǡǓ ǎǡǓ Ǔǡǎ ǔǡǏ 0 $%$ ǎǡǏ ǎǡǏ ǎǡǓ ǒǡǑ ǍǡǍ ǐǡǏ ǑǡǍ ǐǡǖ ǍǡǕ Ǒǡǖ -*-$) ǏǡǍ ǏǡǍ ǎǡǔ Ǐǡǒ ǐǡǏ ǍǡǍ ǎǡǕ ǍǡǕ ǐǡǖ Ǔǡǔ #00& ǐǡǏ Ǐǡǖ ǏǡǓ ǎǡǓ ǑǡǍ ǎǡǕ ǍǡǍ ǎǡǏ ǑǡǕ ǒǡǕ )0. ǏǡǕ Ǐǡǔ ǏǡǑ ǎǡǓ ǐǡǖ ǍǡǕ ǎǡǏ ǍǡǍ ǑǡǓ Ǔǡǔ *)" ǎǡǖ ǏǡǍ Ǐǡǐ Ǔǡǎ ǍǡǕ ǐǡǖ ǑǡǕ ǑǡǓ ǍǡǍ ǒǡǍ 2$$ ǒǡǔ ǒǡǐ ǒǡǑ ǔǡǏ Ǒǡǖ Ǔǡǔ ǒǡǕ Ǔǡǔ ǒǡǍ ǍǡǍ distances in thousand km
  7. expected tools population size NCFS PG UPPMT 5J ∼ 1PJTTPO(λJ)

    λJ = α1β J /γ IBWF UIFTF λ WBMVFT BEKVTUFE CZ B WBSZJOH JOUFSDFQU QBSBNFUFS DFQU UP UIF FYQSFTTJPO BCPWF CVU UIFO λJ NJHIU FOE VQ OFHBUJWF ZJOH JOUFSDFQUT NVMUJQMJDBUJWF 5J ∼ 1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ ņ[J] JT UIF WBSZJOH JOUFSDFQU #VU VOMJLF UZQJDBM WBSZJOH JOUFSDFQUT IU PG HFPHSBQIJD EJTUBODF OPU EJTUJODU DBUFHPSZ NFNCFSTIJQ U PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF JOUFSD ⎛ ⎜ L ⎞ ⎟ ⎛ ⎜ ⎛ ⎜  ⎞ ⎟ ⎞ ⎟
  8. expected tools Varying factor F WBSZJOH JOUFSDFQUT NVMUJQMJDBUJWF 5J ∼

    1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ ŀļİĶIJŁņ[J] JT UIF WBSZJOH JOUFSDFQU #VU VOMJLF UZQJDBM WBSZJOH JOUFS O MJHIU PG HFPHSBQIJD EJTUBODF OPU EJTUJODU DBUFHPSZ NFNCFSTIJQ IFBSU PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ L L L . . . L ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ∼ .7/PSNBM ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝    . . .  ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ , , ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ,JK = η FYQ(−ρ% JK) + δJKσ [de MJOF JT UIF EJNFOTJPOBM (BVTTJBO QSJPS GPS UIF JOUFSDFQUT *U
  9. expected tools Varying factor F WBSZJOH JOUFSDFQUT NVMUJQMJDBUJWF 5J ∼

    1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ ŀļİĶIJŁņ[J] JT UIF WBSZJOH JOUFSDFQU #VU VOMJLF UZQJDBM WBSZJOH JOUFS O MJHIU PG HFPHSBQIJD EJTUBODF OPU EJTUJODU DBUFHPSZ NFNCFSTIJQ IFBSU PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ L L L . . . L ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ∼ .7/PSNBM ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝    . . .  ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ , , ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ,JK = η FYQ(−ρ% JK) + δJKσ [de MJOF JT UIF EJNFOTJPOBM (BVTTJBO QSJPS GPS UIF JOUFSDFQUT *U • Works like a proportion: k = 0 exp(0) = 1 As expected k = –0.5 exp(–0.5) = 0.6 60% of expected k = 0.25 exp(0.25) = 1.3 130% of expected
  10. 5J ∼ 1PJTTPO(λJ) λJ = α1β J /γ 8FE MJLF

    UP IBWF UIFTF λ WBMVFT BEKVTUFE CZ B WBSZJOH JOUFSDFQU QBSBNFUFS 8F BEE UIF JOUFSDFQU UP UIF FYQSFTTJPO BCPWF CVU UIFO λJ NJHIU FOE VQ OFHBUJWF 4P JO NBLF UIF WBSZJOH JOUFSDFQUT NVMUJQMJDBUJWF 5J ∼ 1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ XIFSF LŀļİĶIJŁņ[J] JT UIF WBSZJOH JOUFSDFQU #VU VOMJLF UZQJDBM WBSZJOH JOUFSDFQUT JU X NBUFE JO MJHIU PG HFPHSBQIJD EJTUBODF OPU EJTUJODU DBUFHPSZ NFNCFSTIJQ ćF IFBSU PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF JOUFSDFQU ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ L L L . . . L ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ∼ .7/PSNBM ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝    . . .  ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ , , ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ [prior fo ,JK = η FYQ(−ρ% JK) + δJKσ [define covari ćF ĕSTU MJOF JT UIF EJNFOTJPOBM (BVTTJBO QSJPS GPS UIF JOUFSDFQUT *U IBT  EJ Unfamiliar prior • Gaussian process prior: • Multivariate Gaussian • Means all zero (usually) • Model the covariance matrix using pairwise distances vector of factors covariance matrix
  11. Modeling covariance covariance btw islands i & j max cov

    rate of decline with distance squared distance variance self XIFSF LŀļİĶIJŁņ[J] JT UIF WBSZJOH JOUFSDFQU #VU VOMJLF UZQJDBM WBSZJOH JOUFSDF NBUFE JO MJHIU PG HFPHSBQIJD EJTUBODF OPU EJTUJODU DBUFHPSZ NFNCFSTIJQ ćF IFBSU PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF JO ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ L L L . . . L ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ∼ .7/PSNBM ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝    . . .  ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ , , ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ,JK = η FYQ(−ρ% JK) + δJKσ [defin ćF ĕSTU MJOF JT UIF EJNFOTJPOBM (BVTTJBO QSJPS GPS UIF JOUFSDFQUT *U IB CFDBVTF UIFSF BSF  TPDJFUJFT JO UIF EJTUBODF NBUSJY ćF WFDUPS PG NFBOT J NFBOT UIF JOTJEF UIF MJOFBS NPEFM UIF BWFSBHF TPDJFUZ XJMM NVMUJQMZ λ CZ FY WFSBHF EPFTOU DIBOHF UIF FYQFDUBUJPO /FHBUJWF L WBMVFT XJMM SFEVDF λ BOE XJMM JODSFBTF JU ćF DPWBSJBODF NBUSJY GPS UIFTF JOUFSDFQUT JT OBNFE , BOE UIF DPWBSJB QBJS PG TPDJFUJFT J BOE K JT ,JK  ćJT DPWBSJBODF JT EFĕOFE CZ UIF GPSNVMB P CPWF ćJT GPSNVMB VTFT UISFF QBSBNFUFST‰η ρ BOE σ‰UP NPEFM IPX D
  12. Modeling covariance XJUI XIFUIFS JODMVEJOH TQBUJBM TJNJMBSJUZ XBTIFT PVU UIF

    BTTPDJBUJPO CFUXFFO BOE UIF UPUBM UPPMT ćF IFBSU PG UIF (BVTTJBO QSPDFTT JT UIF NVMUJWBSJBUF QSJPS GPS UIFTF JOUF γ ∼ .7/PSNBM [, . . . , ], , >S ,JK = η FYQ(−ρ% JK) + δJKσ >GHÀQH ćF ĕSTU MJOF JT UIF EJNFOTJPOBM (BVTTJBO QSJPS GPS UIF JOUFSDFQUT *U IBT CFDBVTF UIFSF BSF  JTMBOE TPDJFUJFT JO UIF EJTUBODF NBUSJY ćF WFDUPS PG N SPT CFDBVTF XFWF QVU UIF HSBOE NFBO α JO UIF MJOFBS NPEFM XIJDI NBLFT EFWJBUJPOT GSPN UIF FYQFDUBUJPO ćF DPWBSJBODF NBUSJY GPS UIFTF JOUFSDFQUT JT OBNFE , BOE UIF DPWBSJBO QBJS PG JTMBOET J BOE K JT ,JK  ćJT DPWBSJBODF JT EFĕOFE CZ UIF GPSNVMB PO BCPWF ćJT GPSNVMB VTFT UISFF QBSBNFUFST‰η ρ BOE σ‰UP NPEFM IPX DPW TPDJFUJFT DIBOHFT XJUI EJTUBODFT BNPOH UIFN *U QSPCBCMZ MPPLT WFSZ VOGBN ZPV UISPVHI JU JO QJFDFT ćF QBSU PG UIF GPSNVMB GPS , UIBU HJWFT UIF DPWBSJBODF NPEFM JUT TIBQF %JK JT UIF EJTUBODF CFUXFFO UIF JUI BOE KUI TPDJFUJFT 4P XIBU UIJT GVODUJPO DPWBSJBODF CFUXFFO BOZ UXP TPDJFUJFT J BOE K EFDMJOFT FYQPOFOUJBMMZ XJUI UIF TR CFUXFFO UIFN ćF QBSBNFUFS ρ EFUFSNJOFT UIF SBUF PG EFDMJOF *G JU JT MBSHF U   .6-5*-&7&- .0%&-4 ** 0 1 2 3 4 0.0 0.2 0.4 0.6 0.8 1.0 distance correlation 'ĶĴłĿIJ ƉƋƎ 4IBQF PG UIF GVODUJP EJTUBODF UP UIF DPWBSJBODF ,JK  ćF UBM BYJT JT EJTUBODF ćF WFSUJDBM JT MBUJPO SFMBUJWF UP NBYJNVN CFUXFF TPDJFUJFT J BOE K ćF EBTIFE DVSWF FBS EJTUBODF GVODUJPO ćF TPMJE DV TRVBSFE EJTUBODF GVODUJPO squared linear Linear: Cov declines fastest at near distances. Squared: Cov declines fastest at intermediate distances.
  13. Putting it all together S UIFN 8FMM EFĕOF QSJPST GPS

    UIF TRVBSF PG FBDI BOE FTUJNBUF UIFN PO UIF TBN DBVTF UIBUT DPNQVUBUJPOBMMZ FBTJFS 8F EPOU OFFE σ JO UIJT NPEFM TP XFMM JOTUFBE BU BO JSSFMFWBOU DPOTUBOU /PX IFSFT UIF GVMM NPEFM XJUI UIF ĕYFE QSJPST GPS FBDI QBSBNFUFS BEEFE BU UIF C 5J ∼ 1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ L ∼ .7/PSNBM (, . . . , ), , ,JK = η FYQ(−ρ% JK) + δJK(.) α ∼ &YQPOFOUJBM() β ∼ &YQPOFOUJBM() η ∼ &YQPOFOUJBM() ρ ∼ &YQPOFOUJBM(.)
  14. Prior covariance functions   "%7&/563&4 */ $07"3*"/$& 0 2

    4 6 8 10 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process prior 0 2 4 6 8 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process posteri 'ĶĴłĿIJ ƉƌƉƉ -FU 1SJPS EJTUSJCVUJPO PG TQBUJBM DPWBSJBODF GVODUJPOT &B   /PX IFSFT UIF GVMM NPEFM XJUI UIF ĕYFE QSJPST GPS FBDI QBSBNFUFS BEEFE BU UIF CPUUPN 5J ∼ 1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ L ∼ .7/PSNBM (, . . . , ), , ,JK = η FYQ(−ρ% JK) + δJK(.) α ∼ &YQPOFOUJBM() β ∼ &YQPOFOUJBM() η ∼ &YQPOFOUJBM() ρ ∼ &YQPOFOUJBM(.)
  15. Coding m14.7 <- ulam( alist( T ~ dpois(lambda), lambda <-

    (a*P^b/g)*exp(k[society]), vector[10]:k ~ multi_normal( 0 , SIGMA ), matrix[10,10]:SIGMA <- cov_GPL2( Dmat , etasq , rhosq , 0.01 ), c(a,b,g) ~ dexp( 1 ), etasq ~ dexp( 2 ), rhosq ~ dexp( 0.5 ) ), data=dat_list , chains=4 , cores=4 , iter=2000 )
  16. Coding m14.7 <- ulam( alist( T ~ dpois(lambda), lambda <-

    (a*P^b/g)*exp(k[society]), vector[10]:k ~ multi_normal( 0 , SIGMA ), matrix[10,10]:SIGMA <- cov_GPL2( Dmat , etasq , rhosq , 0.01 ), c(a,b,g) ~ dexp( 1 ), etasq ~ dexp( 2 ), rhosq ~ dexp( 0.5 ) ), data=dat_list , chains=4 , cores=4 , iter=2000 )
  17. Coding m14.7 <- ulam( alist( T ~ dpois(lambda), lambda <-

    (a*P^b/g)*exp(k[society]), vector[10]:k ~ multi_normal( 0 , SIGMA ), matrix[10,10]:SIGMA <- cov_GPL2( Dmat , etasq , rhosq , 0.01 ), c(a,b,g) ~ dexp( 1 ), etasq ~ dexp( 2 ), rhosq ~ dexp( 0.5 ) ), data=dat_list , chains=4 , cores=4 , iter=2000 )
  18. Coding m14.7 <- ulam( alist( T ~ dpois(lambda), lambda <-

    (a*P^b/g)*exp(k[society]), vector[10]:k ~ multi_normal( 0 , SIGMA ), matrix[10,10]:SIGMA <- cov_GPL2( Dmat , etasq , rhosq , 0.01 ), c(a,b,g) ~ dexp( 1 ), etasq ~ dexp( 2 ), rhosq ~ dexp( 0.5 ) ), data=dat_list , chains=4 , cores=4 , iter=2000 )
  19. Marginal posterior • k values on log scale, so a

    bit opaque (/-$3β͟͠΁͟͠γ΂  ѶΖ *1ά ͡ΰ (/ ΁ /., ΁ -#*., ΁ ͟΀͟͠ α΁ ΰ΁΁"α ѽ  3+ΰ ͠ α΁ /., ѽ  3+ΰ ͡ α΁ -#*., ѽ  3+ΰ ͟΀ͤ α α΁ /Ѵ/ά'$./ ΁ #$).Ѵͣ ΁ *- .Ѵͣ ΁ $/ -Ѵ͟͟͟͡ α #F TVSF UP DIFDL UIF DIBJOT ćFZ TIPVME TBNQMF XFMM CVU XF DPVME BMTP JNQSPWF TBNQMJOH CZ EFDFOUFSJOH UIF QSJPS GPS L 8FMM EP UIBU JO CPY GVSUIFS EPXO -FUT DIFDL UIF QPTUFSJPS 3 DPEF  +- $.ΰ (ͣ͠΀ͦ ΁  +/#Ѵ͢ α ( ) . ͤ΀ͤњ ͨͣ΀ͤњ )ά !! #/ &β͠γ Ζ͟΀ͣ͠ ͟΀ͨ͡ Ζ͟΀ͥ͟ ͟΀͢͟ ͦͨ͢ ͠΀͟͠ &β͡γ ͟΀͟͟ ͟΀ͦ͡ Ζ͟΀ͣ͟ ͟΀ͣ͢ ͥͦͥ ͠΀͟͠ &β͢γ Ζ͟΀ͣ͟ ͟΀ͦ͡ Ζ͟΀ͣ͢ ͟΀ͦ͢ ͥͧͦ ͠΀͟͠ &βͣγ ͟΀ͦ͢ ͟΀ͥ͡ ͟΀͟͟ ͟΀ͦͦ ͦͤ͠ ͠΀͟͠ &βͤγ ͟΀͟͠ ͟΀ͤ͡ Ζ͟΀ͥ͡ ͟΀ͣͧ ͦͨ͡ ͠΀͟͠ &βͥγ Ζ͟΀ͤ͢ ͟΀ͥ͡ Ζ͟΀ͦͤ ͟΀͟͡ ͧͣ͢ ͠΀͟͟ &βͦγ ͟΀ͥ͠ ͟΀ͤ͡ Ζ͟΀ͨ͠ ͟΀ͤͣ ͦ͢͡ ͠΀͟͠ &βͧγ Ζ͟΀ͧ͠ ͟΀ͤ͡ Ζ͟΀ͤͦ ͟΀ͧ͠ ͦͨͥ ͠΀͟͠ &βͨγ ͟΀ͨ͡ ͟΀͢͡ Ζ͟΀ͣ͟ ͟΀ͥͥ ͦͣ͡ ͠΀͟͠ &β͟͠γ Ζ͟΀ͣ͠ ͟΀͢͡ Ζ͟΀ͥͤ ͟΀͢͢ ͤ͢͠͠ ͠΀͟͠  ͠΀ͣͣ ͠΀ͦ͟ ͟΀ͦ͡ ͢΀ͣ͟ ͨͧͣ͠ ͠΀͟͟  ͟΀ͧ͡ ͟΀ͧ͟ ͟΀ͤ͠ ͟΀ͣ͠ ͠͡͠͡ ͠΀͟͠ " ͟΀ͥ͢ ͟΀ͤͦ ͟΀ͧ͟ ͠΀ͥͨ ͥͧͤ͠ ͠΀͟͠ /., ͟΀ͧ͠ ͟΀ͧ͠ ͟΀͟͢ ͟΀ͣͦ ͨͤ͠ ͠΀͟͟ -#*., ͠΀ͨ͢ ͠΀ͥͦ ͟΀͟͠ ͣ΀ͦͥ ͧͤ͟͠ ͠΀͟͟ 'JSTU OPUF UIBU UIF DPFďDJFOU GPS MPH QPQVMBUJPO + JT WFSZ NVDI BT JU XBT CFGPSF XF BEEFE
  20. Covariance function 5J ∼ 1PJTTPO(λJ) MPH λJ = α +

    γĶŀĹĮĻı[J] + β1 MPH 1J γ ∼ .7/PSNBM (, . . . , ), , ,JK = η FYQ(−ρ% JK) + δJK(.) α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) η ∼ )BMG$BVDIZ(, ) ρ ∼ )BMG$BVDIZ(, ) ρ BOE η NVTU CF QPTJUJWF TP XF QMBDF IBMG$BVDIZ QSJPST PO UIFN ćFSFT O BM BCPVU UIF $BVDIZ IFSF *UT KVTU B VTFGVM XFBLMZJOGPSNBUJWF QSJPS GPS TDBMF JLF UIFTF *G ZPV BSF DPODFSOFE BCPVU UIF JNQBDU PG UIF QSJPST ZPV TIPVME SF JOH XJUI EJČFSFOU QSJPST " MJUUMF LOPXMFEHF PG 1BDJĕD OBWJHBUJPO XPVME QSPC TNBSU JOGPSNBUJWF QSJPS PO ρ BU MFBTU ĕOBMMZ SFBEZ UP ĕU UIF NPEFM ćF EJTUSJCVUJPO UP VTF UP TJHOBM UP (+Ǐ./) UP UIF TRVBSFE EJTUBODF (BVTTJBO QSPDFTT QSJPS JT  Ǐ ćF SFTU PG UIF DPEF TIP S   "%7&/563&4 */ $07"3*"/$& 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process prior 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process posterior &β͠γ Ζ͟΀ͣ͠ ͟΀ͨ͡ Ζ͟΀ͥ͟ ͟΀͢͟ ͦ &β͡γ ͟΀͟͟ ͟΀ͦ͡ Ζ͟΀ͣ͟ ͟΀ͣ͢ ͥ &β͢γ Ζ͟΀ͣ͟ ͟΀ͦ͡ Ζ͟΀ͣ͢ ͟΀ͦ͢ ͥ &βͣγ ͟΀ͦ͢ ͟΀ͥ͡ ͟΀͟͟ ͟΀ͦͦ ͦ &βͤγ ͟΀͟͠ ͟΀ͤ͡ Ζ͟΀ͥ͡ ͟΀ͣͧ ͦ &βͥγ Ζ͟΀ͤ͢ ͟΀ͥ͡ Ζ͟΀ͦͤ ͟΀͟͡ ͧ &βͦγ ͟΀ͥ͠ ͟΀ͤ͡ Ζ͟΀ͨ͠ ͟΀ͤͣ ͦ &βͧγ Ζ͟΀ͧ͠ ͟΀ͤ͡ Ζ͟΀ͤͦ ͟΀ͧ͠ ͦ &βͨγ ͟΀ͨ͡ ͟΀͢͡ Ζ͟΀ͣ͟ ͟΀ͥͥ ͦ &β͟͠γ Ζ͟΀ͣ͠ ͟΀͢͡ Ζ͟΀ͥͤ ͟΀͢͢ ͠͠  ͠΀ͣͣ ͠΀ͦ͟ ͟΀ͦ͡ ͢΀ͣ͟ ͨ͠  ͟΀ͧ͡ ͟΀ͧ͟ ͟΀ͤ͠ ͟΀ͣ͠ ͠͡ " ͟΀ͥ͢ ͟΀ͤͦ ͟΀ͧ͟ ͠΀ͥͨ ͥ͠ /., ͟΀ͧ͠ ͟΀ͧ͠ ͟΀͟͢ ͟΀ͣͦ ͨ -#*., ͠΀ͨ͢ ͠΀ͥͦ ͟΀͟͠ ͣ΀ͦͥ ͧ͠ 'JSTU OPUF UIBU UIF DPFďDJFOU GPS MPH BMM UIJT (BVTTJBO QSPDFTT TUVČ ćJT SFMFWBOU DPOTUBOU IFSFT UIF GVMM NPEFM XJUI UIF ĕYFE QSJPST GPS FBDI QBSBNFUFS BEEFE BU UIF CPUUPN 5J ∼ 1PJTTPO(λJ) λJ = FYQ(LŀļİĶIJŁņ[J] )α1β J /γ L ∼ .7/PSNBM (, . . . , ), , ,JK = η FYQ(−ρ% JK) + δJK(.) α ∼ &YQPOFOUJBM() β ∼ &YQPOFOUJBM() η ∼ &YQPOFOUJBM() ρ ∼ &YQPOFOUJBM(.)
  21. Covariance function 5J ∼ 1PJTTPO(λJ) MPH λJ = α +

    γĶŀĹĮĻı[J] + β1 MPH 1J γ ∼ .7/PSNBM (, . . . , ), , ,JK = η FYQ(−ρ% JK) + δJK(.) α ∼ /PSNBM(, ) β1 ∼ /PSNBM(, ) η ∼ )BMG$BVDIZ(, ) ρ ∼ )BMG$BVDIZ(, ) ρ BOE η NVTU CF QPTJUJWF TP XF QMBDF IBMG$BVDIZ QSJPST PO UIFN ćFSFT O BM BCPVU UIF $BVDIZ IFSF *UT KVTU B VTFGVM XFBLMZJOGPSNBUJWF QSJPS GPS TDBMF JLF UIFTF *G ZPV BSF DPODFSOFE BCPVU UIF JNQBDU PG UIF QSJPST ZPV TIPVME SF JOH XJUI EJČFSFOU QSJPST " MJUUMF LOPXMFEHF PG 1BDJĕD OBWJHBUJPO XPVME QSPC TNBSU JOGPSNBUJWF QSJPS PO ρ BU MFBTU ĕOBMMZ SFBEZ UP ĕU UIF NPEFM ćF EJTUSJCVUJPO UP VTF UP TJHOBM UP (+Ǐ./) UP UIF TRVBSFE EJTUBODF (BVTTJBO QSPDFTT QSJPS JT  Ǐ ćF SFTU PG UIF DPEF TIP S   "%7&/563&4 */ $07"3*"/$& 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process prior 0 2 4 6 8 10 0.0 0.5 1.0 1.5 2.0 distance (thousand km) covariance Gaussian process posterior &β͠γ Ζ͟΀ͣ͠ ͟΀ͨ͡ Ζ͟΀ͥ͟ ͟΀͢͟ ͦ &β͡γ ͟΀͟͟ ͟΀ͦ͡ Ζ͟΀ͣ͟ ͟΀ͣ͢ ͥ &β͢γ Ζ͟΀ͣ͟ ͟΀ͦ͡ Ζ͟΀ͣ͢ ͟΀ͦ͢ ͥ &βͣγ ͟΀ͦ͢ ͟΀ͥ͡ ͟΀͟͟ ͟΀ͦͦ ͦ &βͤγ ͟΀͟͠ ͟΀ͤ͡ Ζ͟΀ͥ͡ ͟΀ͣͧ ͦ &βͥγ Ζ͟΀ͤ͢ ͟΀ͥ͡ Ζ͟΀ͦͤ ͟΀͟͡ ͧ &βͦγ ͟΀ͥ͠ ͟΀ͤ͡ Ζ͟΀ͨ͠ ͟΀ͤͣ ͦ &βͧγ Ζ͟΀ͧ͠ ͟΀ͤ͡ Ζ͟΀ͤͦ ͟΀ͧ͠ ͦ &βͨγ ͟΀ͨ͡ ͟΀͢͡ Ζ͟΀ͣ͟ ͟΀ͥͥ ͦ &β͟͠γ Ζ͟΀ͣ͠ ͟΀͢͡ Ζ͟΀ͥͤ ͟΀͢͢ ͠͠  ͠΀ͣͣ ͠΀ͦ͟ ͟΀ͦ͡ ͢΀ͣ͟ ͨ͠  ͟΀ͧ͡ ͟΀ͧ͟ ͟΀ͤ͠ ͟΀ͣ͠ ͠͡ " ͟΀ͥ͢ ͟΀ͤͦ ͟΀ͧ͟ ͠΀ͥͨ ͥ͠ /., ͟΀ͧ͠ ͟΀ͧ͠ ͟΀͟͢ ͟΀ͣͦ ͨ -#*., ͠΀ͨ͢ ͠΀ͥͦ ͟΀͟͠ ͣ΀ͦͥ ͧ͠ 'JSTU OPUF UIBU UIF DPFďDJFOU GPS MPH BMM UIJT (BVTTJBO QSPDFTT TUVČ ćJT 0.0 0.5 1.0 1.5 2.0 0 5 10 15 20 post$etasq post$rhosq
  22. Implied correlations • Covariance (and variance) on log scale, so

    hard to understand • Compute correlations at posterior median: $"ΰ α ѶΖ ( $)ΰ+*./с /.,α ѯ ͟΀͟͠ 4FDPOE XF DPOWFSU UP B DPSSFMBUJPO NBUSJY 3 DPEF  ϗ *)1 -/ /* *-- '/$*) (/-$3 #* ѶΖ -*0)ΰ *1͡*-ΰ α ΁ ͡ α ϗ  -*2ζ*' )( . !*- *)1 )$ ) *')( .ΰ#*α ѶΖ ΰΊ'Ί΁Ί$Ί΁ΊΊ΁ΊΊ΁Ί$Ί΁Ί-Ί΁Ί#Ί΁Ί)Ί΁Ί*Ί΁Ί  -*2)( .ΰ#*α ѶΖ *')( .ΰ#*α #* ' $   $ - # ) *  ' ͠΀͟͟ ͟΀ͦͧ ͟΀ͥͨ ͟΀͟͟ ͟΀͢͟ ͟΀ͣ͟ ͟΀͟͟ ͟΀͟͟ ͟΀ͦ͟ ͟ $ ͟΀ͦͧ ͠΀͟͟ ͟΀ͧͥ ͟΀͟͟ ͟΀ͨ͡ ͟΀ͤ͟ ͟΀͟͟ ͟΀͟͟ ͟΀ͤ͟ ͟  ͟΀ͥͨ ͟΀ͧͥ ͠΀͟͟ ͟΀͟͟ ͟΀ͤ͠ ͟΀͟͠ ͟΀͟͠ ͟΀͟͠ ͟΀͟͡ ͟  ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͠΀͟͟ ͟΀͟͟ ͟΀͟͠ ͟΀ͤ͠ ͟΀͢͠ ͟΀͟͟ ͟ $ ͟΀͢͟ ͟΀ͨ͡ ͟΀ͤ͠ ͟΀͟͟ ͠΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀ͥ͟ ͟ - ͟΀ͣ͟ ͟΀ͤ͟ ͟΀͟͠ ͟΀͟͠ ͟΀͟͟ ͠΀͟͟ ͟΀ͧ͟ ͟΀ͤͣ ͟΀͟͟ ͟ # ͟΀͟͟ ͟΀͟͟ ͟΀͟͠ ͟΀ͤ͠ ͟΀͟͟ ͟΀ͧ͟ ͠΀͟͟ ͟΀͢͠ ͟΀͟͟ ͟ ) ͟΀͟͟ ͟΀͟͟ ͟΀͟͠ ͟΀͢͠ ͟΀͟͟ ͟΀ͤͣ ͟΀͢͠ ͠΀͟͟ ͟΀͟͟ ͟ * ͟΀ͦ͟ ͟΀ͤ͟ ͟΀͟͡ ͟΀͟͟ ͟΀ͥ͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͠΀͟͟ ͟  ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͟΀͟͟ ͠ ćF DMVTUFS PG TNBMM TPDJFUJFT JO UIF VQQFSMFę PG UIF NBUSJY‰.BMFLVMB .M
  23. -40 -20 0 20 -20 -10 0 10 20 longitude

    latitude Malekula Tikopia Santa Cruz Yap Lau Fiji Trobriand Chuuk Manus Tonga Hawaii 7 8 9 10 11 12 20 30 40 50 60 70 log population total tools Malekula Tikopia Santa Cruz Yap Lau Fiji Trobriand Chuuk Manus Tonga Hawaii 'ĶĴłĿIJ ƉƌƉƊ -Fę 1PTUFSJPS DPSSFMBUJPOT BNPOH TPDJFUJFT JO HFPHSBQIJD TQBDF 3JHIU 4BNF QPTUFSJPS DPSSFMBUJPOT OPX TIPXO BHBJOTU SFMBUJPOTIJQ CFUXFFO UPUBM UPPMT BOE MPH QPQVMBUJPO ϗ $.+'4 +*./ -$*- +- $/$*).
  24. -40 -20 0 20 -20 -10 0 10 20 longitude

    latitude Malekula Tikopia Santa Cruz Yap Lau Fiji Trobriand Chuuk Manus Tonga Hawaii 7 8 9 10 11 12 20 30 40 50 60 70 log population total tools Malekula Tikopia Santa Cruz Yap Lau Fiji Trobriand Chuuk Manus Tonga Hawaii 'ĶĴłĿIJ ƉƌƉƊ -Fę 1PTUFSJPS DPSSFMBUJPOT BNPOH TPDJFUJFT JO HFPHSBQIJD TQBDF 3JHIU 4BNF QPTUFSJPS DPSSFMBUJPOT OPX TIPXO BHBJOTU SFMBUJPOTIJQ CFUXFFO UPUBM UPPMT BOE MPH QPQVMBUJPO ϗ $.+'4 +*./ -$*- +- $/$*).
  25. Gaussian process regression • Many applications, many covariance functions •

    Periodic functions of time (seasonality) • Phylogenetic (patristic) distance => phylogenetic regression • Social networks • Non-parametric splines on any predictor • Can use multiple dimensions in covariance, “automatic relevance determination” OUJBM OPOJOEFQFOEFODF PG TQFDJFT 'PS UIPTF JOUFSFTUFE JO TPDJBM OFUXPSLT OF F JT BOPUIFS UZQF PG BCTUSBDU EJTUBODF UIBU DBO CF QMVHHFE JOUP UIFTF NPEFMT PUIFS DPNNPO VTF GPS (BVTTJBO QSPDFTT SFHSFTTJPO JT UP NPEFM DZDMJDBM DPWBS NF *O UIPTF DBTFT UIF DPWBSJBODF NBUSJY , JT NPEFMFE VTJOH QFSJPEJD GVODUJPOT JOF BSF UIF FBTJFTU UP VTF‰PG EJTUBODF JO UJNF ćJT IFMQT NPEFM TFBTPOBM JOĘV JNQPTJOH BOZ IBSE DVUPČT GPS TFBTPOT IF EFĕOJUJPO PG , JTOU UIF TBNF JO BMM (BVTTJBO QSPDFTT NPEFMT CVU UIF CBTJD NPEFMJOH DPWBSJBODF BT B GVODUJPO PG EJTUBODF JT QSFTFOU JO BMM TVDI NPEFMT *U UP VTF NPSF UIBO POF EJNFOTJPO PG EJTUBODF BU UIF TBNF UJNF ćJT DPSSFTQP JOH TMPQFT TUSBUFHZ JO XIJDI WBSJBUJPO XJUIJO BOE CFUXFFO DBUFHPSJFT EFQFOET GFBUVSFT #VU UIF (BVTTJBO QSPDFTT NFSHFT BMM PG UIFTF JOĘVFODFT JOUP B DPNNP F NBUSJY BOE TP B DPNNPO JOUFSDFQU *U XPVME CF QPTTJCMF GPS FYBNQMF UP SFNP DF PG QPQVMBUJPO TJ[F JO UIF 0DFBOJD EBUB GSPN UIF MJOFBS NPEFM BOE NFSHF JU JO (BVTTJBO QSPDFTT *O UIBU DBTF B DPNNPO BQQSPBDI JT UP EFĕOF UIF DPWBSJBOD ,JK = η FYQ − ρ % % JK + ρ 1(MPH 1J − MPH 1K) + δJKσ
  26. Phylogenetic regression • Phylogenetic relationships like unobserved confounds • Phylogenetic

    distance a clue to covariation • Ways to get phylogenetic information into a GLM • Brownian motion model (PGLS) • Ornstein–Uhlenbeck (OU) processes • Many others • All use covariance matrix to represent phylogeny • Each in principle Gaussian process regression
  27. Allenopithecus nigroviridis Cercopithecus albogularis Cercopithecus ascanius Cercopithecus campbelli Cercopithecus campbelli

    lowei Cercopithecus cephus Cercopithecus cephus cephus Cercopithecus cephus ngottoensis Cercopithecus diana Cercopithecus erythrogaster Cercopithecus erythrogaster erythrogaster Cercopithecus erythrotis Cercopithecus hamlyni Cercopithecus lhoesti Cercopithecus mitis Cercopithecus mona Cercopithecus neglectus Cercopithecus nictitans Cercopithecus petaurista Cercopithecus pogonias Cercopithecus preussi Cercopithecus solatus Cercopithecus wolfi Chlorocebus aethiops Chlorocebus pygerythrus Chlorocebus pygerythrus cynosurus Chlorocebus sabaeus Chlorocebus tantalus Erythrocebus patas Miopithecus talapoin Allocebus trichotis Archaeolemur majori Avahi cleesei Avahi laniger Avahi occidentalis Avahi unicolor leus crossleyi ogaleus major Cheirogaleus m Daubentonia madagascariensis Eulem ur coronatus Eulem ur fulvus albifrons Eulem ur fulvus albocollaris Eulem ur fulvus collaris Eulem ur fulvus fulvus Eulem ur fulvus m ayottensis Eulem ur fulvus rufus Eulem ur fulvus sanfordi Eulem ur m acaco flavifrons Eulem ur m acaco m acaco Eulem ur m ongoz Eulem ur rubriventer Hapalem ur aureus Hapalem ur griseus Hapalemur griseus alaotrensis Hapalemur griseus griseus Hapalemur griseus meridionalis Hapalemur griseus occidentalis Hapalemur simus Indri indri Lemur catta Lepilemur aeec Lepilemur ankar Lepilemur dorsal Lepilemur edw Lepilemur hubb Lepilemur leuco Lepilemur manasa Lepilemur microdon Lepilemur mits Lepilemur mustelinu Lepilemur otto Lepilemur rand Lepilemur rufica Lepilemur saham Lepilemur seali Lepilemur septent Microcebus berthae cebus bongolavensis icrocebus danfossi Microcebus griseorufus icrocebus jollyae s lehilahytsara bus lokobensis cebus macarthurii bus mamiratra bus mittermeieri Microcebus murinus Microcebus myoxinus cebus ravelobensis icrocebus rufus sambiranensis ebus simmonsi rocebus tavaratra irza coquereli Mirza zaza Phaner furcifer Phaner furcifer pallesce Propithecus coquereli Propithecus deckenii Propithecus diadema Propithecus edwardsi Propithecus tattersalli Propithecus verreauxi Varecia rubra Varecia variegata variegata Alouatta belzebul Alouatta caraya Alouatta guariba Alouatta palliata Alouatta pigra Alouatta sara Alouatta seniculus Ateles belzebuth Ateles fusciceps Ateles geoffroyi Ateles paniscus Brachyteles arachnoides Lagothrix lagotricha Aotus azarai Aotus azarai boliviensis Aotus brumbacki Aotus infulatus Aotus lemurinus Aotus lemurinus griseimembra Aotus nancymaae Aotus nigriceps Aotus trivirgatus Aotus vociferans Callimico goeldii Callithrix argentata Callithrix aurita Callithrix emiliae Callithrix geoffroyi Callithrix humeralifera Callithrix jacchus Callithrix kuhli Callithrix mauesi Callithrix penicillata Callithrix pygmaea Cebus albifrons Cebus apella Cebus capucinus Cebus olivaceus Cebus xanthosternos Leontopithecus chrysomelas Leontopithecus chrysopygus Leontopithecus rosalia Saguinus bicolor Saguinus fuscicollis Saguinus fuscicollis melanoleucus Saguinus geoffroyi Saguinus imperator Saguinus leucopus Saguinus midas Saguinus mystax Saguinus niger Saguinus oedipus Saguinus tripartitus Saim iri boliviensis Saim iri oerstedii Saim iri sciureus Saim iri ustus Arctocebus aureus Arctocebus calabarensis Loris lydekkerianus Loris tardigradus Nycticebus bengalensis Nycticebus coucang Nycticebus javanicus Nycticebus menagensis Nycticebus pygmaeus Perodicticus potto Bunopithecus hoolock Gorilla beringei Gorilla gorilla gorilla Gorilla gorilla graueri Homo sapiens Homo sapiens neanderthalensis Hylobates agilis Hylobates klossii H ylobates lar Hylobates m oloch H ylobates m uelleri Hylobates pileatus Nom ascus concolor Nom ascus gabriellae Nom ascus leucogenys Nomascus nasutus Nom ascus siki Pan paniscus Pan troglodytes schweinfurthii Pan troglodytes troglodytes Pan troglodytes vellerosus Pan troglodytes verus Pongo abelii Pongo pygmaeus Sym phalangus syndactylus Cacajao calvus Cacajao m elanocephalus Callicebus donacophilus Callicebus hoffmannsi Callicebus moloch Callicebus personatus Callicebus torquatus Chiropotes satanas Pithecia irrorata Pithecia pithecia Cercocebus agilis Cercocebus galeritus Cercocebus torquatus Cercocebus torquatus atys Lophocebus albigena Lophocebus aterrim us Macaca arctoides Macaca assamensis Macaca brunnescens Macaca cyclopis Macaca fascicula Macaca fuscata Macaca hecki Macaca leonina Macaca maura Macaca mulatta Macaca munzal Macaca nemestrin Macaca nemestrina l Macaca nemestrina si Macaca nigra Macaca nigrescens Macaca ochreata Macaca pagensis Macaca radiata Macaca silenus Macaca sinica Macaca sylvan Macaca thibeta Macaca tonkeana M andrillus leucophaeus M andrillus sphinx Papio anubis Papio cynocephalus Papio ham adryas Papio papio Papio ursinus Rungwecebus kipunji Theropithecus gelada Colobus angol Colobus angol Colobus guer Colobus polyk Colobus sata Colobus velle Nasalis larvatus Piliocolobus b liocolobus foai us gordonorum iocolobus kirkii obus pennantii olobus preussi us rufomitratus us tephrosceles ocolobus tholloni Presbytis comata Presbytis m elalophos Procolobus verus Pygathrix cinerea ygathrix nemaeus pithecus avunculus Rhinopithecus bieti hinopithecus brelichi opithecus roxellana emnopithecus entellus Trachypithecus auratus Trachypithecus cristatus Trachypithecus delacouri Trachypithecus francoisi Trachypithecus geei Trachypithecus germaini Trachypithecus johnii Trachypithecus laotum Trachypithecus obscurus Trachypithecus phayrei Trachypithecus pileatus Trachypithecus poliocephalus Trachypithecus vetulus Euoticus elegantulus Galago alleni Galago gallarum Galago granti Galago matschiei Galago moholi Galago senegalensis Galagoides demidoff Galagoides zanzibaricus Otolemur crassicaudatus Otolemur garnettii Tarsius bancanus Tarsius dentatus Tarsius lariang Tarsius syrichta library(rethinking) data(Primates301) data(Primates301_nex) library(ape) plot( Primates301_nex , type="fan" , font=1 , no.margin=TRUE , label.offset=1 , cex=0.5 )
  28. Allenopithecus nigroviridis Cercopithecus albogularis Cercopithecus ascanius Cercopithecus campbelli Cercopithecus campbelli

    lowei Cercopithecus cephus Cercopithecus cephus cephus Cercopithecus cephus ngottoensis Cercopithecus diana Cercopithecus erythrogaster Cercopithecus erythrogaster erythrogaster Cercopithecus erythrotis Cercopithecus hamlyni Cercopithecus lhoesti Cercopithecus mitis Cercopithecus mona Cercopithecus neglectus Cercopithecus nictitans Cercopithecus petaurista Cercopithecus pogonias Cercopithecus preussi Cercopithecus solatus Cercopithecus wolfi Chlorocebus aethiops Chlorocebus pygerythrus Chlorocebus pygerythrus cynosurus Chlorocebus sabaeus Chlorocebus tantalus Erythrocebus patas Miopithecus talapoin Allocebus trichotis Archaeolemur majori Avahi cleesei Avahi laniger Avahi occidentalis Avahi unicolor leus crossleyi ogaleus major Cheirogaleus m Daubentonia madagascariensis Eulem ur coronatus Eulem ur fulvus albifrons Eulem ur fulvus albocollaris Eulem ur fulvus collaris Eulem ur fulvus fulvus Eulem ur fulvus m ayottensis Eulem ur fulvus rufus Eulem ur fulvus sanfordi Eulem ur m acaco flavifrons Eulem ur m acaco m acaco Eulem ur m ongoz Eulem ur rubriventer Hapalem ur aureus Hapalem ur griseus Hapalemur griseus alaotrensis Hapalemur griseus griseus Hapalemur griseus meridionalis Hapalemur griseus occidentalis Hapalemur simus Indri indri Lemur catta Lepilemur aeec Lepilemur ankar Lepilemur dorsal Lepilemur edw Lepilemur hubb Lepilemur leuco Lepilemur manasa Lepilemur microdon Lepilemur mits Lepilemur mustelinu Lepilemur otto Lepilemur rand Lepilemur rufica Lepilemur saham Lepilemur seali Lepilemur septent Microcebus berthae cebus bongolavensis icrocebus danfossi Microcebus griseorufus icrocebus jollyae s lehilahytsara bus lokobensis cebus macarthurii bus mamiratra bus mittermeieri Microcebus murinus Microcebus myoxinus cebus ravelobensis icrocebus rufus sambiranensis ebus simmonsi rocebus tavaratra irza coquereli Mirza zaza Phaner furcifer Phaner furcifer pallesce Propithecus coquereli Propithecus deckenii Propithecus diadema Propithecus edwardsi Propithecus tattersalli Propithecus verreauxi Varecia rubra Varecia variegata variegata Alouatta belzebul Alouatta caraya Alouatta guariba Alouatta palliata Alouatta pigra Alouatta sara Alouatta seniculus Ateles belzebuth Ateles fusciceps Ateles geoffroyi Ateles paniscus Brachyteles arachnoides Lagothrix lagotricha Aotus azarai Aotus azarai boliviensis Aotus brumbacki Aotus infulatus Aotus lemurinus Aotus lemurinus griseimembra Aotus nancymaae Aotus nigriceps Aotus trivirgatus Aotus vociferans Callimico goeldii Callithrix argentata Callithrix aurita Callithrix emiliae Callithrix geoffroyi Callithrix humeralifera Callithrix jacchus Callithrix kuhli Callithrix mauesi Callithrix penicillata Callithrix pygmaea Cebus albifrons Cebus apella Cebus capucinus Cebus olivaceus Cebus xanthosternos Leontopithecus chrysomelas Leontopithecus chrysopygus Leontopithecus rosalia Saguinus bicolor Saguinus fuscicollis Saguinus fuscicollis melanoleucus Saguinus geoffroyi Saguinus imperator Saguinus leucopus Saguinus midas Saguinus mystax Saguinus niger Saguinus oedipus Saguinus tripartitus Saim iri boliviensis Saim iri oerstedii Saim iri sciureus Saim iri ustus Arctocebus aureus Arctocebus calabarensis Loris lydekkerianus Loris tardigradus Nycticebus bengalensis Nycticebus coucang Nycticebus javanicus Nycticebus menagensis Nycticebus pygmaeus Perodicticus potto Bunopithecus hoolock Gorilla beringei Gorilla gorilla gorilla Gorilla gorilla graueri Homo sapiens Homo sapiens neanderthalensis Hylobates agilis Hylobates klossii H ylobates lar Hylobates m oloch H ylobates m uelleri Hylobates pileatus Nom ascus concolor Nom ascus gabriellae Nom ascus leucogenys Nomascus nasutus Nom ascus siki Pan paniscus Pan troglodytes schweinfurthii Pan troglodytes troglodytes Pan troglodytes vellerosus Pan troglodytes verus Pongo abelii Pongo pygmaeus Sym phalangus syndactylus Cacajao calvus Cacajao m elanocephalus Callicebus donacophilus Callicebus hoffmannsi Callicebus moloch Callicebus personatus Callicebus torquatus Chiropotes satanas Pithecia irrorata Pithecia pithecia Cercocebus agilis Cercocebus galeritus Cercocebus torquatus Cercocebus torquatus atys Lophocebus albigena Lophocebus aterrim us Macaca arctoides Macaca assamensis Macaca brunnescens Macaca cyclopis Macaca fascicula Macaca fuscata Macaca hecki Macaca leonina Macaca maura Macaca mulatta Macaca munzal Macaca nemestrin Macaca nemestrina l Macaca nemestrina si Macaca nigra Macaca nigrescens Macaca ochreata Macaca pagensis Macaca radiata Macaca silenus Macaca sinica Macaca sylvan Macaca thibeta Macaca tonkeana M andrillus leucophaeus M andrillus sphinx Papio anubis Papio cynocephalus Papio ham adryas Papio papio Papio ursinus Rungwecebus kipunji Theropithecus gelada Colobus angol Colobus angol Colobus guer Colobus polyk Colobus sata Colobus velle Nasalis larvatus Piliocolobus b liocolobus foai us gordonorum iocolobus kirkii obus pennantii olobus preussi us rufomitratus us tephrosceles ocolobus tholloni Presbytis comata Presbytis m elalophos Procolobus verus Pygathrix cinerea ygathrix nemaeus pithecus avunculus Rhinopithecus bieti hinopithecus brelichi opithecus roxellana emnopithecus entellus Trachypithecus auratus Trachypithecus cristatus Trachypithecus delacouri Trachypithecus francoisi Trachypithecus geei Trachypithecus germaini Trachypithecus johnii Trachypithecus laotum Trachypithecus obscurus Trachypithecus phayrei Trachypithecus pileatus Trachypithecus poliocephalus Trachypithecus vetulus Euoticus elegantulus Galago alleni Galago gallarum Galago granti Galago matschiei Galago moholi Galago senegalensis Galagoides demidoff Galagoides zanzibaricus Otolemur crassicaudatus Otolemur garnettii Tarsius bancanus Tarsius dentatus Tarsius lariang Tarsius syrichta Apes “Old World” Monkeys Galagos Lorises Lemurs Tarsiers “New World” Monkeys
  29. Alouatta belzebul Alouatta caraya Alouatta guariba Alouatta palliata Alouatta pigra

    Alouatta sara Alouatta seniculus Ateles belzebuth Ateles fuscic Bunopithecus hoolock Gorilla beringei Gorilla gorilla gorilla Gorilla gorilla graueri Homo sapiens Homo sapiens neanderthalensis Hylobates agilis Hylobates klossii H ylobates lar Hylobates m oloch H ylobates m uelleri Hylobates pileatus Nom ascus concolor Nom ascus gabriellae Nom ascus leucogenys Nomascus nasutus Nom ascus siki Pan paniscus Pan troglodytes schweinfurthii Pan troglodytes troglodytes Pan troglodytes vellerosus Pan troglodytes verus Pongo abelii Pongo pygmaeus Sym phalangus syndactylus Colobus s salis larvatus Piliocolob olobus foai ordonorum olobus kirkii s pennantii bus preussi ufomitratus ephrosceles obus tholloni Presbytis comata Presbytis m elalophos olobus verus athrix cinerea thrix nemaeus ecus avunculus hinopithecus bieti pithecus brelichi hecus roxellana opithecus entellus Trachypithecus auratus Trachypithecus cristatus Trachypithecus delacouri Trachypithecus francoisi Trachypithecus geei Trachypithecus germaini achypithecus johnii Trachypithecus laotum Trachypithecus obscurus Trachypithecus phayrei achypithecus pileatus Trachypithecus poliocephalus rachypithecus vetulus
  30. Group size Group size Brain size Body size

  31. Allenopithecu Cercopithecus albogularis Cercopithecus ascanius Cercopithecus cam Cercopithecus cephus Cercopithecus

    di Cercopithecus Cercopithecus mitis Cercopithecus Cercopithecus nictitans Cercopithecus petaur Cercopithecus po Erythrocebus Avahi laniger Avahi occidentalis Cheirogaleus m Cheirogaleus m Daubentonia madagascariensis Eulem ur coronatus Eulemur fulvus fulvus Eulemur fulvus rufus Eulem ur m acaco m acaco Eulem ur m ongoz Eulemur rubriventer H apalem ur griseus Hapalem ur sim us Indri indri Lem ur catta emur dorsalis lemur edwardsi mur leucopus ur microdon r mustelinus r ruficaudatus Microcebus m Microcebus ru Mirza coquere Propithecus coq Propithecus diadem Propithecus edward Propithecus verre Varecia variegata variegata Alouatta belzebul Alouatta caraya Alouatta guariba Alouatta palliata Alouatta pigra Alouatta seniculus Ateles belzebuth Ateles geoffroyi Ateles paniscus Lagothrix lagotricha Aotus azarai Aotus trivirgatus Callimico goeldii Callithrix argentata Callithrix jacchus Callithrix penicillata Callithrix pygmaea Cebus albifrons Cebus apella Cebus capucinus Cebus olivaceus Leontopithecus chrysomelas Leontopithecus rosalia Saguinus fuscicollis Saguinus geoffroyi Saguinus leucopus Saguinus midas Saguinus mystax Saguinus oedipus Saimiri oerstedii Saimiri sciureus Arctocebus calabarensis Loris tardigradus Nycticebus coucang Nycticebus pygmaeus Perodicticus potto Bunopithecus hoolock Gorilla gorilla gorilla Hylobates agilis Hylobates klossii Hylobates lar Hylobates m uelleri Hylobates pileatus Nomascus gabriellae Pan paniscus Pan troglodytes troglodytes Pongo pygmaeus Symphalangus syndactylus Cacajao calvus acajao melanocephalus Chiropotes satanas Pithecia pithecia Cercocebus galeritus Cercocebus torquatus Cercocebus torquatus atys Lophocebus albigena Lophocebus aterrimus Macaca assamensis M acaca cyclopis M acaca fascicularis M acaca fuscata M acaca m ulatta M acaca nem estrina M acaca nigra Macaca radiata Macaca silenus Macaca sinica M acaca sylvanus Mandrillus leucophaeus Mandrillus sphinx Papio anubis Papio cynocephalus Papio hamadryas Papio ursinus Theropithecus gelada Colobus angolensis Colobus guereza Colobus polykomos Colobus satanas Colobus vellerosus Nasalis larvatus Piliocolobus badius Piliocolobus kirkii Piliocolobus tephrosceles Presbytis comata Presbytis melalophos Procolobus verus ygathrix nemaeus opithecus roxellana hecus entellus hecus cristatus Trachypithec pithecus johnii hecus obscurus pithecus phayrei Trachypithec hecus vetulus Euoticus elegantulus Galago alleni Galago matschiei Galago moholi Galago senegalensis Galagoides demidoff Galagoides zanzibaricus Otolemur crassicaudatus Otolemur garnettii Tarsius bancanus arsius dentatus Tarsius syrichta Complete cases: Brain, body, group size
  32. Ordinary regression, weirded • Any linear regression can be expressed

    as a multi- variate regression • Consider outcome as a single vector: PHPVT UP BO PSEJOBSZ NVMUJMFWFM NPEFMJOH DPOUFYU "OE WBSZJOH FČFDUT D U XFMM HFU UIF WBSZJOH FČFDUT BT JU XFSF GSPN UIF QIZMPHFOFUJD USFF TUSVDUV IJOH XJUI UIF USFF IPXFWFS MFUT SVO BO PSEJOBSZ SFHSFTTJPO BOBMZ[JOH MP O PG MPH CSBJO TJ[F BOE MPH CPEZ TJ[F #VU * XBOU UP CVJME UIJT PSEJOB JOBSZ TUZMF CFDBVTF JU XJMM IFMQ ZPV VOEFSTUBOE UIF OFYU TUFQ XIFSF XF TU NBUJPO JOTJEF ćJOL PG BMM PG UIF TQFDJFT BT B TJOHMF WBSJBCMF B WFDUPS PG  PNF PG UIFTF WBMVFT BSF NPSF TJNJMBS UP POF BOPUIFS *O B UZQJDBM SFHSFTTJP JUJFT VTJOH QSFEJDUPS WBSJBCMFT "ęFS DPOEJUJPOJOH PO UIF QSFEJDUPS WBSJBCM FMBUJPOT 4P XF DBO XSJUF TVDI B NPEFM VTJOH B CJH NVMUJWBSJBUF PVUDP F UIJT ( ∼ .7/PSNBM(µ, 4) µJ = α + β# #J + β. .J FDJFT HSPVQT TJ[FT BOE 4 JT B DPWBSJBODF NBUSJY XJUI BT NBOZ SPXT BOE DPMVN BO PSEJOBSZ SFHSFTTJPO UIJT NBUSJY UBLFT UIF GPSN 4 = σ* All group sizes Covariance matrix ZMF CFDBVTF JU XJMM IFMQ ZPV VOEFSTUBOE UIF OFYU TUFQ XIFSF XF TUJDL TJEF ćJOL PG BMM PG UIF TQFDJFT BT B TJOHMF WBSJBCMF B WFDUPS PG  IFTF WBMVFT BSF NPSF TJNJMBS UP POF BOPUIFS *O B UZQJDBM SFHSFTTJPO H QSFEJDUPS WBSJBCMFT "ęFS DPOEJUJPOJOH PO UIF QSFEJDUPS WBSJBCMFT 4P XF DBO XSJUF TVDI B NPEFM VTJOH B CJH NVMUJWBSJBUF PVUDPNF ( ∼ .7/PSNBM(µ, 4) µJ = α + β# #J + β. .J VQT TJ[FT BOE 4 JT B DPWBSJBODF NBUSJY XJUI BT NBOZ SPXT BOE DPMVNOT BSZ SFHSFTTJPO UIJT NBUSJY UBLFT UIF GPSN 4 = σ* FWJBUJPO ZPVWF VTFE TJODF $IBQUFS  BOE * JT BO ĶıIJĻŁĶŁņ ĺĮŁĿĶŅ POH UIF EJBHPOBM BOE [FSPT FWFSZXIFSF FMTF :PV DBO UIJOL PG JU BT B “Identity” matrix 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1
  33. Ordinary regression, weirded m14.8 <- ulam( alist( G ~ multi_normal(

    mu , SIGMA ), mu <- a + bM*M + bB*B, matrix[N_spp,N_spp]: SIGMA <- Imat * sigma_sq, a ~ normal( 0 , 1 ), c(bM,bB) ~ normal( 0 , 0.5 ), sigma_sq ~ exponential( 1 ) ), data=dat_list , chains=4 , cores=4 ) sigma_sq bM bB a -0.5 0.0 0.5 1.0 Value
  34. Group size Group size Brain size Body size U “phylogeny”

  35. Brownian motion • Oldest & most conservative way to model

    covariance as function of phylogeny: Brownian motion • Implies covariance declines linearly with phylogenetic distance • Really no one is satisfied with this, but common 0 50 100 150 0 20 40 60 phylogenetic distance covariance
  36. • Just replace identity matrix with matrix of correlations implied

    by linear function m14.9 <- ulam( alist( G ~ multi_normal( mu , SIGMA ), mu <- a + bM*M + bB*B, matrix[N_spp,N_spp]: SIGMA <- R * sigma_sq, a ~ normal( 0 , 1 ), c(bM,bB) ~ normal( 0 , 0.5 ), sigma_sq ~ exponential( 1 ) ), data=dat_list , chains=4 , cores=4 ) sigma_sq bM bB a -1 0 1 2 3 Value
  37. 40 32 26 11 11 25 17 16 4 16

    14 15 3 10 28 91 1 2 3 1 1 1 7 9 10 8 9 3 3 3 3 8 3 16 1 1 1 1 1 1 1 1 1 1 1 1 6 5 6 4 6 3 7 9 7 13 6 8 14 42 20 20 33 4 4 3 3 3 7 10 6 8 9 6 6 25 8 18 11 7 4 4 7 6 7 5 8 6 5 7 60 25 35 1 1 1 1 1 3 6 4 3 3 2 3 3 4 1 1 85 50 1 4 24 30 1 1 3 2 4 14 4 3 20 27 35 16 18 21 20 27 41 38 23 35 14 34 21 20 18 21 17 14 40 48 37 47 10 11 8 10 16 16 11 34 34 40 24 34 7 14 6 9 30 50 65 19 11 27 11 10 10 13 8 8 1 6 1 1 4 6 1 4 1 1 1 1
  38. Gaussian process • No reason to assume linear decline with

    distance • Many possible covariance functions • Gaussian process considers an infinite number of specific form 0 50 100 150 0 20 40 60 phylogenetic distance covariance
  39. bM bB a -1.0 -0.5 0.0 0.5 Value FSZUIJOH FMTF

    JT UIF TBNF 3 DPEF  ȕ  .'  ) - *- -  $./) (/-$3 /Ǿ'$./ɶ(/ ʚǶ (/ȁ .++Ǿ*. Ǣ .++Ǿ*. Ȃ ȅ (3ǿ(/Ȁ (ǎǑǡǎǍ ʚǶ 0'(ǿ '$./ǿ  ʡ (0'/$Ǿ)*-('ǿ (0 Ǣ   ȀǢ (0 ʚǶ  ʔ ȉ ʔ ȉǢ (/-$3ȁǾ.++ǢǾ.++Ȃǣ   ʚǶ *1Ǿ Ǐǿ (/ Ǣ /., Ǣ -#*., Ǣ ǍǡǍǎ ȀǢ  ʡ )*-('ǿǍǢǎȀǢ ǿǢȀ ʡ )*-('ǿǍǢǍǡǒȀǢ /., ʡ 3+*) )/$'ǿǎȀǢ -#*., ʡ 3+*) )/$'ǿǎȀ ȀǢ /ʙ/Ǿ'$./ Ǣ #$).ʙǑ Ǣ *- .ʙǑ Ȁ +- $.ǿ (ǎǑǡǎǍ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/
  40. 0.0 0.2 0.4 0.6 0.8 1.0 0 1 2 3

    4 5 phylogenetic distance covariance
  41. Phylogenetic regression • Many possible covariance functions • Variable rates

    on branches • Different trees for different traits (hemiplasy) • Many equilibria • No unique null model — p-values weird • Causation: Organisms are silly machines (joint causation over time)