Regression – How to Use the Within Transformation for Logistic Regression?

econometricsestimationmixed modelregression

I would like to estimate a logistic regression model where the target variable $y_{it}$ is grouped. It is the number of experiments and the number of successes for a given unit $i$ during time period $t$. I would like to fit a fixed effects model and additional covariates $X_{it}$. This post presents the "within transformation" as a way to estimate OLS fixed effects models. In that case, the target $y_{it}$ is continuous and the OLS model is transformed as:

$$y_{it} – \bar y_i – \bar y_t + \bar y_{it} = (\bf x_{it} – \bar x_i – \bar x_t + \bar x_{it})\bf \beta$$

I don't see how this can be used in logistic regression since $y_{it}$ is not a single number but 2 related counts. Is there any way to approach this other than the dummy variable method?

Best Answer

The within transformation will not work because of the non-linearity of the logit function. There are some possible solutions:

  1. Fit a panel linear probability FE model
  2. Conditional logit
  3. Unconditional fixed effects logit estimator using dummies
  4. Pseudo-demeaning algorithm
  5. CRE (Mundlak-Chamberlain device)