• Again, sample from posterior 1. Use mean and standard deviation to approximate posterior 2. Sample from multivariate normal distribution of parameters 3. Use samples to generate predictions that integrate over the uncertainty "%%*/( 30 35 40 45 50 55 60 140 150 160 170 180 weight height UIF NPEFM TBZT #VU GPS FWFO TMJHIUMZ NPSF JOUFSBDUJPO FČFDUT $IBQUFS JOUFSQSFUJOH UIJT UIF QSPCMFN PG JODPSQPSBUJOH UIF JOGPSN QMPUT BSF JSSFQMBDFBCMF 8FSF HPJOH UP TUBSU XJUI B TJNQMF WFSTJP NFBO WBMVFT PWFS UIF IFJHIU BOE XFJHIU EBU
fitting • Makes estimation easier • Helps interpretation (sometimes) • To standardize: • subtract mean • divide by standard deviation • result: mean of zero and standard deviation of 1
data • Parameters influence every part of curve, so hard to understand • Not actually very flexible — can’t have a monotonic curve! -2 -1 0 1 2 60 100 140 180 weight.s height N = 10
many local, less wiggly functions • Basis function: A local function • Better than polynomials, but equally geocentric • Bayesian B-splines often called P-splines.
but with some weird synthetic variables: • Weights w are like slopes • Basis functions B are synthetic variables • In spirit like a squared or cubed terms • But observed data not used to build B • B values turn on weights in different regions of x variable FSFT B MPOHFS FYQMBOBUJPO XJUI WJTVBM FYBNQMFT 0VS HPBM JT UP BQQSPYJNBUF UI SF USFOE XJUI B XJHHMZ GVODUJPO 8JUI #TQMJOFT KVTU MJLF XJUI QPMZOPNJBM SFHS UIJT CZ HFOFSBUJOH OFX QSFEJDUPS WBSJBCMFT BOE VTJOH UIPTF JO UIF MJOFBS NPEFM PMZOPNJBM SFHSFTTJPO #TQMJOFT EP OPU EJSFDUMZ USBOTGPSN UIF QSFEJDUPS CZ TRVB H JU *OTUFBE UIFZ JOWFOU B TFSJFT PG FOUJSFMZ OFX TZOUIFUJD QSFEJDUPS WBSJBCMFT TF WBSJBCMFT TFSWFT UP HSBEVBMMZ UVSO B TQFDJĕD QBSBNFUFS PO BOE PČ XJUIJO B T PG UIF QSFEJDUPS WBSJBCMFT &BDI PG UIFTF WBSJBCMFT JT DBMMFE B įĮŀĶŀ ijłĻİŁĶļ NPEFM FOET VQ MPPLJOH WFSZ GBNJMJBS µJ = α + X #J, + X #J, + X #J, + ... #J,O JT UIF OUI CBTJT GVODUJPOT WBMVF PO SPX J BOE UIF X QBSBNFUFST BSF DPSSF FJHIUT GPS FBDI ćF QBSBNFUFST BDU MJLF TMPQFT BEKVTUJOH UIF JOĘVFODF PG FBD PO PO UIF NFBO µJ 4P SFBMMZ UIJT JT KVTU BOPUIFS MJOFBS SFHSFTTJPO CVU XJUI TPN UJD QSFEJDUPS WBSJBCMFT ćFTF TZOUIFUJD WBSJBCMFT EP TPNF SFBMMZ FMFHBOU EFTDSJ OUSJDXPSL GPS VT PX EP XF DPOTUSVDU UIFTF CBTJT WBSJBCMFT # * EJTQMBZ UIF TJNQMFTU DBTF JO 'ĶĴłĿ DI * BQQSPYJNBUF UIF UFNQFSBUVSF EBUB XJUI GPVS EJČFSFOU MJOFBS BQQSPYJNBUJPO F UIF GVMM SBOHF PG UIF IPSJ[POUBM BYJT JOUP GPVS QBSUT VTJOH QJWPU QPJOUT DBMMFE OPUT BSF TIPXO CZ UIF + TZNCPMT JO UIF UPQ QMPU ćFO ĕWF EJČFSFOU CBTJT GVO
— locations on predictor variable where the spline is anchored • Choose degree of basis functions — how wiggly • Find posterior distribution of weights
'30. -*/&4 800 1000 1200 1400 1600 1800 2000 year basis value 0 1 1 2 3 4 5 1306 is * weight 0 1 3 5 knots Each basis defines the local region where it influences the spline Figure 4.12
Must worry about overfitting data (Chapter 7) • Other types of splines don’t require knots • Another idea: Gaussian Processes (Chapter 14) • All splines are descriptive, not mechanistic