building hmsc step by step: single-species distribution

14
Building HMSC step by step: single-species distribution modelling

Upload: others

Post on 01-Dec-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Building HMSC step by step: single-species distribution modelling

Full HMSC Single-species HMSC

Back to basics: the linear model

𝑦𝑖 = 𝛼 + 𝛽π‘₯𝑖 + πœ€π‘–

𝑖 = 1,2,3, … , 𝑛

𝑦

π‘₯

πœ€π‘–~𝑁(0, 𝜎2)

The linear model:

Index for data points:

Response (or dependent) variable:

Explanatory (or independent or predictor) variable:

Residual:𝛽

Intercept:

Slope:

𝛼

Several explanatory variables and the linear predictor

𝑦𝑖 = 𝛼 + 𝛽1π‘₯𝑖1 + 𝛽1π‘₯𝑖2 + πœ€π‘–The linear model with two variables:

𝑦𝑖 = 𝛽1π‘₯𝑖1 + 𝛽2π‘₯𝑖2 + 𝛽3π‘₯𝑖3 + πœ€π‘–Can also be parameterized as:

π‘₯𝑖1 = 1where for all sampling units 𝑖

𝑛𝑐

Can be written more compactly as where

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

is the linear predictor and is the number of covariates (including the intercept)

𝑦𝑖 = 𝐿𝑖 + πœ€π‘–

Continuous versus categorical predictors

In the basic linear model

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

𝑦𝑖 = 𝛼 + 𝛽π‘₯𝑖 + πœ€π‘–

π‘₯ is a continuous explanatory variable (covariate)

Often π‘₯ is a categorical explanatory variable (factor), e.g. habitat type

classified as coniferous forest, broadleaved forest, or mixed forest.

π‘₯𝑖1 = 1 for all sampling units

π‘₯𝑖2 = 1 if 𝑖 is in broadleaved forest, otherwise π‘₯𝑖2 = 0

This can be incorporated as:

π‘₯𝑖3 = 1 if 𝑖 is in mixed forest, otherwise π‘₯𝑖3 = 0

Generalized linear models

Presence-absence data: 𝑦𝑖~Bernoulli(πœ‡π‘–)

Logistic regression: πœ‡π‘– = logitβˆ’1(𝐿𝑖)

Probit regression: πœ‡π‘– = Ξ¦(𝐿𝑖)

𝐿Linear predictor

πœ‡O

ccu

rren

ce

pro

bab

ility

Generalized linear models

Count data: 𝑦𝑖~Poisson(πœ‡π‘–)

Poisson modelπœ‡π‘– = exp(𝐿𝑖)

Lognormal Poisson model

𝐿Linear predictor

πœ‡Ex

pec

ted

co

un

t

πœ‡π‘– = exp(𝐿𝑖 + πœ€π‘–)

𝑦 = 3,0,0,2,1

𝑦 = 3,0,0,2,30,…

Hurdle models for zero inflated data

Assume that the data looks like 𝑦 = 0, 42, 39, 0, 43

We can model separately presence-absence

and abundance conditional on presence

𝑦 = 0, 1, 1, 0, 1

𝑦 = NA, 42, 39, NA, 43

These two parts of the hurdle-model can be fitted independently of each other, but they can be thought to jointly form one model.

The presence-absence part predicts if the species is present or not. If it is present, then the abundance (conditional on presence) part predicts how abundant the species is.

Mixed models: fixed effects and random effects

Linear model with fixed effects only:

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

𝑦𝑖 = 𝐿𝑖 + πœ€π‘–

πœ€π‘–~𝑁(0, 𝜎2)

iid

Hierarchical study design: Plot

Sampling unit

Mixed models: fixed effects and random effects

Linear model with fixed and random effects:

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

𝑦𝑖 = 𝐿𝑖 + π‘Žπ‘(𝑖) + πœ€π‘–

πœ€π‘–~𝑁(0, 𝜎2)

iid

Hierarchical study design: Plot

Sampling unit

π‘Žπ‘~𝑁(0, πœŽπ‘ƒ2)

iid

Mixed models: fixed effects and random effects

Spatial study design:

Mixed models: fixed effects and random effects

Spatial study design:

Linear model without spatial structure:

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

𝑦𝑖 = 𝐿𝑖 + πœ€π‘–

πœ€π‘–~𝑁(0, 𝜎2)

iid

Mixed models: fixed effects and random effects

Spatial study design:

Linear model with spatial structure:

𝐿𝑖 =π‘˜=1

π‘›π‘π›½π‘˜π‘₯π‘–π‘˜

𝑦𝑖 = 𝐿𝑖 + π‘Žπ‘– + πœ€π‘–

Cov π‘Žπ‘– , π‘Žπ‘— = πœŽπ‘†2 exp βˆ’π‘‘π‘–π‘—/𝛼

πœ€π‘–~𝑁(0, 𝜎2)

iidπ‘Žπ‘–~𝑁(0, πœŽπ‘†2)

Fitting a spatial model enables using spatial information when generating predictions