nonlinear models and hierarchical nonlinear modelspeople.bu.edu/dietze/bayes2018/lesson24.pdf ·...

27
Nonlinear Models and Hierarchical Nonlinear Models

Upload: others

Post on 21-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Nonlinear Models

and

Hierarchical Nonlinear Models

Page 2: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Assumption of linearity

● The final assumption of linear models thatwe'll address is that of linearity– Recall that linearity of models is wrt

parameters

● “Beastiary” of model from lecture 6(Bolker ch 3)

Page 3: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Assumption of linearity

● Consider any arbitrary function / processmodel y = g(x|q

m)

– Choose a data model y ~ PDF( g(x|q

m) , q

d )

– If Bayesian, choose priors on qm

& qd

Page 4: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Fitting nonlinear models

● Rarely an analytical solution● Likelihood

– Numerical optimization– LRT or Bootstrap error estimates &

prediction● Bayes

– Metropolis-Hastings

Page 5: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Fitting nonlinear models

● Nothing you haven't seen / donebefore

● Nothing sacred about linear models

Page 6: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Things to watch for...

● Parameteridentifiability

● Redundantparameters

Y= abc X

Y= 1b 'c ' X

Page 7: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Things to watch for...

● Oddcorrelationsbetweenparameters

Page 8: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Nonlinear Hierarchical Models

● Often takes more thought to decide whichparameters you consider random andwhich are fixed

● Setting all parameters to random canoften result in unidentifiablity

● Inclusion of covariates also challenging

Page 9: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Example: Coho salmon reproduction

● Beverton-Holt pop'n model with DD

● Consider– s = # of spawning Coho salmon

– r = # of recruits

● Reproduction varies by stream?– How can we incorporate random stream effect?

r t=st

1/st /rmet

Page 10: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Alternatives

r i , t=st

1/isi , t /rmei ,t

r i , t=st

1/si , t /rm,iei ,t

r i , t=st

1/isi , t /rm,iei , t

r i , t=st

1/si , t /rmei , ti

Page 11: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

r i , t=st

1/isi , t /rm,iei , t Process model

i , t~N 0,2 Residual error

r i ,m~N r ,r2

i~N ,2

Stream-levelparameters

r~N r0,V r~N 0,V

Across streamparameters

,r~IG s1, s2 Across streamvariance

Page 12: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 13: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

FvCB Model

Page 14: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

25 prairie species2 yearsMonthly (within growing season)3-5 replicates/species

Page 15: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 16: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 17: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Example: CO2 effect on treeseedling growth

● i – seedling

● j – plot

● t – year

● l – light

● y - growth

i , j , t=gi , j l j , t−lcl j , t

yi , j , t= i , j , tk ti , j , tyearmean residual

i , j , t~N 0,2k t~N 0,k

gi , j~ln , g

lc varies w/ CO2, Priors on a, v

g, v

k, s2, q, l

c

Page 18: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

CO2 effect

Page 19: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 20: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Canopy Light:Synthesizing multiple data sources

● Plant growth depends upon light (previousexample, lab 7)

● Hard to measure how much light an ADULTtree receives

● Multiple sources of proxy data– Exposed Canopy Area

● aerial photography, Quickbird

– Canopy status ● suppressed, intermediate, dominant (ex 8.2.2)

– Light models● Allometries, stand map

Page 21: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 22: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Mechanistic Light Model• Estimate lightlevels based ona 3D ray-tracinglight model

• Parameterizedbased on canopyphotos, treeallometries

Page 23: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends
Page 24: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Linear models

Logistic

Multinomial

Page 25: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Exposed Canopy Area

● Error in relationship between “true” light l andobservations le

● Probability of observing the tree in imageryincreases with “true” light availability

p ie={ 1−pi i

e=0

piN ln ie∣ln i , e i

e0}

logit pi=c0c1i

Page 26: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Mechanistic Light Model

● Assume a log-log linear relationship between“true” light and modeled light

● Provides a continuous estimate of lightavailability for understory trees– ECA = 0

– Status = 1

p im=N ln i

m∣a0a1⋅ln i ,m

Page 27: Nonlinear Models and Hierarchical Nonlinear Modelspeople.bu.edu/dietze/Bayes2018/Lesson24.pdf · 2018. 5. 2. · Canopy Light: Synthesizing multiple data sources Plant growth depends

Model Fitting

● Model fit all at once● Find the conditional probabilities for each

parameter (i.e. those expressions that containthat parameter)– Always at least 2 – likelihood and prior

– Can be multiple likelihoods

● MCMC iteratively updates each parameterconditioned on the current value of all others