How do I use the within transformation for logistic regression? 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?

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

*

*Fit a panel linear probability FE model

*Conditional logit

*Unconditional fixed effects logit estimator using dummies

*Pseudo-demeaning algorithm

*CRE (Mundlak-Chamberlain device)

