Skip to content

2 Types of regression analyses

  1. Predict \(y\) using \(x\)
  2. Forecast \(y_{t+1}\) using \(x_t\) and \(y_t\)

Suggested Analysis Method

Let’s say you’re trying to analyze the correlation impact of \(x\) on \(y\)

Step Leads to ___ of effect of \(x\) on \(y\)
First analyze obvious factors \(x\) Over-estimation
Include omitted variables and lagged \(x\) Under-estimation
Include heterogeneous effects
ie, the effect of being Manchester United
Hopefully accurate estimation

Lagged Value

Note: This does not matter for grangercausalitytests library

nba["wpc_lag"] = (
  nba
  .groupby("Team")
  ["wpc"]
  .shift(1)
)

Fixed Effect

Helps understand the effect of history of a team.

ie, apart from other factors, does your position matter that you are Manchester United.

regression = smf.ols(
    formula = "wpc ~ wpc_lag + relsal + C(Team, Treatment('Everton'))",
  data = NBA
).fit()

Notebooks