We need a model and a graph. Here are some possibilities for Claire’s study.

Claire

Question Can habitat structure promote individual species and communities?

Methods:

Env variables affect fish abundance in FL 2010 – 2019 on reefs: Temp, depth, seasonality, substrate

Response: 255 spp in data, focus on commercially important species

Some options:

  1. A GLM: each observation is independent, treated as a non-linear regression. Note that there is only one stochastic level.

\[ \begin{aligned} y_{it} &\sim Poi(z_{it} | \lambda_{it} ) \\ \log( \lambda_{it} ) &= \mathbf{x}'_{i,t}\beta \\ \beta &\sim MVN(0, \mathbf{B}) \end{aligned} \]

Recall that this prior distribution is the same as \(\prod_j^p N(0, B_p)\).

  1. A random effect on location

\[ \begin{aligned} y_{it} &\sim Poi(z_{it} | \lambda_{it} ) \\ \log( \lambda_{it} ) &= \mathbf{x}'_{i,t}\beta + \alpha_i \\ \beta &\sim MVN(0, \mathbf{B}) \\ \alpha_i &\sim N(0, \tau^2) \\ \tau^2 &\sim IG(1, 1) \end{aligned} \] Unlike \(\beta\), which has a prior distribution with fixed covariance \(\mathbf{B}\), the random effects \(\alpha_i\) have a variance that is fitted. In other words, the \(alpha_i\) vary, whereas the \(\beta\) coefficients are viewed as fixed.

The random intercept \(\alpha_i\) makes each \(\lambda_i\) stochastic. If I use a random value \(\alpha_{i,t}\), then each has noise. The variance \(\tau^2\) is **process error*$**.

  1. A random effect on location, fixed time effects:

\[ \begin{aligned} y_{it} &\sim Poi(z_{it} | \lambda_{it} ) \\ \log( \lambda_{it} ) &= \mathbf{x}'_{i,t}\beta + \alpha_i + \gamma_t \\ \beta &\sim MVN(0, \mathbf{B}) \\ \gamma_t &\sim N(0, \nu^2) \\ \alpha_i &\sim N(0, \tau^2) \\ \tau^2 &\sim IG(1, 1) \end{aligned} \] The fixed time effect needs a sum-to-zero constraint so that it is not redundant with an intercept in \(\mathbf{x}_{it}\) and random intercept \(\alpha_i\).

  1. A time series: Each \(\lambda\) contributes to the prior distribution of the next \(\lambda\).

\[ \begin{aligned} y_{it} &\sim Poi(z_{it} | \lambda_{it} ) \\ \log( \lambda_{it} ) &= N( \rho \lambda_{it-1} + \mathbf{x}'_{i,t-1}\beta, \sigma^2) \\ \rho &\sim N(0,\gamma^2) \\ \beta &\sim MVN(0, \mathbf{B}) \\ \sigma^2 &\sim IG(1,1) \\ \end{aligned} \] The process error with variance \(\sigma^2\) allows for conditional independence over time, making each \(\lambda_{it}\) have its own distribution.

  1. Joint species distribution model: If many species are fitted, there is a multiplicity problem with interpretating probabilities of effects (they are not independent).

Clara

Question: Can female swamp sparrows differentiate between song from sick males and song from healthy males?

Variables: Females can choose to play songs from healthy or infected males

A female \(i\) responding at time trial \(t\), \[ \begin{aligned} y_{it} &\sim Bernoulli(z_{it} | \theta_{it} ) \\ \mbox{logit}( \theta_{it} ) &= \mathbf{x}'_{i,t}\beta \\ \beta &\sim MVN(0, \mathbf{B}) \end{aligned} \] The response \(y_{it}\) is the (binary) choice of songs. The design \(\mathbf{x}_{it}\) includes attributes that can affect choice, including attributes of the female.

Alternatively, there are numbers of songs chosen in a fixed interval by subject \(i\)

\[ \begin{aligned} n_{i} &\sim Poi( \lambda_{i} ) \\ \log( \lambda_{i} ) &= \mathbf{v}'_{i}\alpha \\ y_{it} &\sim \prod_t^{n_{i}} Bernoulli(z_{it} | \theta_{it} ) \\ \mbox{logit}( \theta_{it} ) &= \mathbf{x}'_{i,t}\beta \\ \beta &\sim MVN(0, \mathbf{B}) \end{aligned} \] The number of trials for an individual \(n_i\) is random (some females make many choices, others few), determined by attributes in \(\mathbf{v}_i\).

Haoyu

Chainey

Alex