Rnovice
Rnovice

Reputation: 353

Obtain intercept using bife in R for fixed effects logistic regression

I am trying to estimate a logistic regression model with fixed effects using the bife package in R. I used this link - bife vignette - to set up the model. My model looks like the following when used in bife command:

logit.bife <- bife(Y ~ X1+X2+X3+X4+...+X13 | ID)

When I use bife, how do I get the intercept value? Is it contained in the average fixed effects, which we get in the output? The average fixed effects can be obtained using logit.bife$par_corr$avg_alpha. I have about 1266 ID values, and I get 1256 values for fixed effects estimates using logit.bife$par_corr$avg_alpha. But, I don't know how to get the intercept value. The vignette indicates that bife estimator is almost the same as that of glm. Usually when we use glm we get an intercept in the model output.

Can anyone suggest how to get the intercept while using bife?

Upvotes: 4

Views: 514

Answers (1)

Julius Vainora
Julius Vainora

Reputation: 48211

There is no single intercept. As it says in ?bife,

The term fixed effect is used in econometrician's sense of having a time-constant dummy for each individual. All other parameters in the model are referred to as structural parameters.

and

The linear predictor must not include any constant regressors due to the perfect collinearity with the fixed effects.

So, essentially we have a separate intercept for each ID, which is the whole point of bife. If you defined a constant regressor and manually added it to the model then it would crash due to perfect multicollinearity: one could not distinguish contribution of the intercept and the sum of all the fixed effects.

However, note that in addition to the average fixed effects you also have individual ones, which should be only more interesting than a single figure:

logit.bife$par$alpha # Uncorrected
logit.bife$par_corr$alpha # Corrected

And indeed, there is nothing special in this sense about bife, the same would happen with glm if you included a dummy variable for each ID (just including the ID variable probably would drop one factor level and include the intercept). Ultimately you should think what your goal is; perhaps the average or median of those fixed effects is indeed what you need.

Upvotes: 3

Related Questions