David L Miller

- What is a GAM?
- What is smoothing?
- How do GAMs work?
- Fitting GAMs using
`dsm`

- Model checking

*Collective noun used to refer to a group of whales, or rarely also of porpoises; a pod.**(by extension) A social gathering of whalers (whaling ships).*

(via Natalie Kelly, CSIRO. Seen in Moby Dick.)

- Generalized: many response distributions
- Additive: terms
**add**together - Models: well, it's a model…

- Count \( n_j \) distributed according to some count distribution
- Model as sum of terms

Taking the previous example…

\[ n_j = A_j\hat{p}_j \exp\left[ \beta_0 + s(\text{y}_j) + s(\text{Depth}_j) \right] + \epsilon_j \]

where \( \epsilon_j \sim N(0, \sigma^2) \), \( \quad n_j\sim \) count distribution

Taking the previous example…

\[ n_j = \color{red}{A_j}\color{blue}{\hat{p}_j} \color{green}{\exp}\left[\color{grey}{ \beta_0 + s(\text{y}_j) + s(\text{Depth}_j)} \right] + \epsilon_j \]

where \( \epsilon_j \sim N(0, \sigma^2) \), \( \quad n_j\sim \) count distribution

- \( \color{red}{\text{area of segment - offset}} \)
- \( \color{blue}{\text{probability of detection in segment}} \)
- \( \color{green}{\text{link function}} \)
- \( \color{grey}{\text{model terms}} \)

\[
\color{red}{n_j} = A_j\hat{p}_j \exp\left[ \beta_0 + s(\text{y}_j) + s(\text{Depth}_j) \right] + \epsilon_j
\]

where \( \epsilon_j \sim N(0, \sigma^2) \), \( \quad \color{red}{n_j\sim \text{count distribution}} \)

- Response is a count (not not always integer)
- Often, it's mostly zero (that's complicated)
- Want response distribution that deals with that
- Flexible mean-variance relationship

- \( \text{Var}\left(\text{count}\right) = \phi\mathbb{E}(\text{count})^q \)
- Common distributions are sub-cases:
- \( q=1 \Rightarrow \) Poisson
- \( q=2 \Rightarrow \) Gamma
- \( q=3 \Rightarrow \) Normal

- We are interested in \( 1 < q < 2 \)
- (here \( q = 1.2, 1.3, \ldots, 1.9 \))