Dear Statalist

This is a question about interpreting the results from a panel data fixed-effects logistic regression. The outcome variable is binary & the main regressor is categorical with 4 levels.

As the estimated odds ratios change depending on which base level is selected, in a cross-sectional setting I prefer to use -margins- and interpret the results in terms of average adjusted predictions (which is unaffected by the base level). However, when using -xtlogit-, the average adjusted predictions appear to change depending on the base level.

Question: is this the expected behaviour for -margins- after -xtlogit-? If so, would it be preferable to interpret the results in terms of odds ratio instead of probabilities in a panel-data setting?

Code:
use http://www.stata-press.com/data/r16/union.dta, clear

xtset idcode year, yearly

* Discretize the -grade- variable into 4 levels for illustration purpose
egen grade_category = cut(grade), at(0,7,13,16,19) icodes
label define grade_category 0 "primary" 1 "secondary" 2 "undergraduate" 3 "postgraduate"
label values grade_category grade_category
If we treat the data as cross-sectional, the results from -margins- are unchanged by the base level of the regressor.

Code:
quietly logit union i.year ib(0).grade_category

margins grade_category

Predictive margins                              Number of obs     =     26,200
Model VCE    : OIM

Expression   : Pr(union), predict()

--------------------------------------------------------------------------------
               |            Delta-method
               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
grade_category |
      primary  |   .2349991   .0276247     8.51   0.000     .1808556    .2891425
    secondary  |   .2073589   .0031732    65.35   0.000     .2011395    .2135782
undergraduate  |   .1943004   .0058311    33.32   0.000     .1828718    .2057291
 postgraduate  |   .2937748   .0064781    45.35   0.000      .281078    .3064717
--------------------------------------------------------------------------------

quietly logit union i.year ib(1).grade_category
margins grade_category
*(output omitted)

quietly logit union i.year ib(2).grade_category
margins grade_category
*(output omitted)

quietly logit union i.year ib(3).grade_category
margins grade_category
*(output omitted)
This is not the case, however, with panel-data -xtlogit-
Code:
. quietly xtlogit union i.year ib(0).grade_category, fe

. margins grade_category

Predictive margins                              Number of obs     =     12,035
Model VCE    : OIM

Expression   : Pr(union|fixed effect is 0), predict(pu0)

--------------------------------------------------------------------------------
               |            Delta-method
               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
grade_category |
      primary  |   .5184114   .0215869    24.02   0.000     .4761018    .5607209
    secondary  |   .5703154   .2774507     2.06   0.040      .026522    1.114109
undergraduate  |   .5507514   .2823345     1.95   0.051    -.0026142    1.104117
 postgraduate  |   .6687735   .2569906     2.60   0.009     .1650813    1.172466
--------------------------------------------------------------------------------

. quietly xtlogit union i.year ib(1).grade_category, fe

. margins grade_category

Predictive margins                              Number of obs     =     12,035
Model VCE    : OIM

Expression   : Pr(union|fixed effect is 0), predict(pu0)

--------------------------------------------------------------------------------
               |            Delta-method
               |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
grade_category |
      primary  |   .4661257   .2823028     1.65   0.099    -.0871777    1.019429
    secondary  |   .5184114   .0215869    24.02   0.000     .4761018    .5607209
undergraduate  |   .4985708   .0396701    12.57   0.000     .4208188    .5763228
 postgraduate  |   .6207837   .0584854    10.61   0.000     .5061544     .735413
--------------------------------------------------------------------------------

*and so on
Thanks,
Junran