'Logit regression : glmer vs bife

I am working on a panel dataset and trying to run a logit regression with fixed effects.

I found that glmer models from the lme4 package and the bife package are suited for this kind of work.

However when I run a regression with each model I do not have the same results (estimates, standard errors, etc.)

Here is the code and results for the glmer model with an intercept:

glmer_1 <- glmer(CVC_dummy~at_log + (1|year), data=own, family=binomial(link="logit"))
summary(glmer_1)

             Estimate  Std. Error  zvalue  Pr(>|z|)    
(Intercept) -6.43327    0.09635   -66.77   <2e-16 ***
at_log       0.46335    0.01101    42.09   <2e-16 ***

Without an intercept:

glmer_2 <- glmer(CVC_dummy~at_log + (1|year)-1, data=own, family=binomial(link="logit"))
summary(glmer_2)

        Estimate  Std.Error  z value  Pr(>|z|)    
at_log  0.46554    0.01099   42.36   <2e-16 ***

And with the bife package:

bife_1 <- bife(CVC_dummy~at_log | year, data=own, model="logit")
summary(bife_1)

        Estimate  Std. error  t-value  Pr(> t)    
at_log   0.4679    0.0110      42.54   <2e-16 ***

Why are estimated coefficients of at_log different between the two packages?

Which package should I use ?



Solution 1:[1]

There is quite a confusion about the terms fixed effects and random effects. From your first sentence, I guess that you intend to calculate a fixed-effects model.

However, while bife calculates fixed-effects models, glmer calculates random-effects models/mixed-effects models.

Both often get confused because random-effects models differ between fixed effects (your usual coefficients, the independent variables you are interested in) and random effects (the variances/std. dev. of your random intercepts and/or random slopes).

On the other hand, fixed-effects models are called that way because they cancel out individual differences by including a dummy variable (-1) for each group, hence by including a fixed effect for each group.

However, not all fixed-effects models work by including indicator-variables: Bife works with pseudo demeaning - yet, the results are the same and it is still called a fixed-effects model.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Poza