3
$\begingroup$

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?

$\endgroup$
4
  • 2
    $\begingroup$ Could you please explain what you mean by the "within transformation"? $\endgroup$
    – whuber
    Commented Jan 4, 2022 at 0:24
  • $\begingroup$ Updated with details. $\endgroup$
    – badmax
    Commented Jan 4, 2022 at 0:37
  • 1
    $\begingroup$ Although the question was already answered to your satisfaction, out of curiosity: why don't you directly fit a logistic regression with the grouped data? This is a bit tricky in R (use proportions as response and the number of experiments in weights), but it is built into glm. $\endgroup$
    – cdalitz
    Commented Jan 4, 2022 at 8:25
  • $\begingroup$ I have a model with group fixed effects and hundreds of other variables I want to regularize. I tried to fit it with glmnet, using a $0$ penalty for the fixed effects, but glmnet runs into numerical issues and doesn't converge. So I am looking at different approaches. $\endgroup$
    – badmax
    Commented Jan 5, 2022 at 17:59

1 Answer 1

4
$\begingroup$

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)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.