18 Lecture 09 - 2019

18.1 Conditioning

Interaction of variables on each other

Dependence on the state

eg. Influence of genes on phenotype depends on environment

Approaches

  1. Use interacting terms (simplest)
  2. Generalized linear models
  3. Multilevel models

Interactions arise wherever there is a boundary in the outcome space. All GLMs have interactions.

In a DAG, an interaction looks like

gene → phenotype ← environment

But DAGs can’t fully tell you if it’s an interaction

Before interaction terms, all variables are simply independent additive terms.

18.1.1 Example: ruggedness

“Ruggedness is bad for the economy outside of Africa, but within Africa is it good”

Reminder - constrain priors to possible outcome space

  1. Scale ruggedness between 0, 1
  2. Constrain change in GDP bc evidently eg GDP x 2 would be a huge effect

Keep it reasonable

Options

  1. Split the data?

Run two linear regressions. This means there is no statistical criteria to measure the split.

We are interested in the contrast in slope, but to do that we need to use the same model.

  1. Add a categorical variable for Africa?

Use alpha[id] and different estimates for each

This means the slope is forced to be the same, but difference intercepts.

Relationship is held constant across groups, not what we want.

  1. Interaction

\(\mu_{i} = \alpha_{CID[i]} + \beta_{CID[i]}(r_{i} - \bar{r})\)

Slope and intercept are allowed to vary for each

18.1.2 Example: tulips

Tulip blooms, in varying Water and Shade

\(\mu_{i} = \alpha + \beta_{W}W + \beta_{S}S + \beta_{W * S}W*S\)

The beta W*S variable is actually a nested linear model

18.2 Interpreting interactions

  • Interpreting interactions is hard
  • The influence of predictors depends upon multiple parameters and their co variation
  • Interactions are symmetric within the data.
    • Eg. effect of continent depends on ruggedness is the same as effect of ruggedness on continent
    • Statistically the same
    • We need to apply our outside knowledge and causal information

18.3 Plotting interactions

Use a triptych

Vary shade at -1, 0, 1

Plot bloom as response and water on x

18.3.1 Higher order interactions

Caution: hard to interpret, hard to estimate