Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logit fixed effects - margins 'not estimable' for factor variables

    Hi,

    I am doing a difference-in-difference analysis. Using panel data (xtset id survey) for individuals I want to run a model that takes account of time fixed effects (survey) and individual (id) fixed effects. My dependent variable produces the probability of the treatment group (s) receiving a positive outcome. Please note I am running this model with three treatment groups: called Tx_5T Tx_6T Tx_7T and there are two post variables: Post and Post_7 (because the Tx_7T group has a different start date to the first two.) Primarily I have undertaken a LPM Fixed Effects model and now I am doing my robustness checks using a Logit Fixed Effects model. My question relates to the Logit FE model and the margins command.


    Using Stata 15.1 my logit model is:
    • xtlogit Dependent_Var Treatment_Post_5 Treatment_Post_6 Treatment_Post_7 i.survey Tx_5T Tx_6T Tx_7T Post Post_7 Control_Var_1 i. Control_Var_2 i.Control_Var_3..., fe vce(bootstrap, reps(1000) dots(97))
    (I have bootstrapped the errors to account for the clustered id standard errors and the I am attempting to account too for the heteroskedasticity in the errors from the binary dependent variable.) The outcome shows the logit FE model concurs with the LPM in terms of direction and statistical significance of coefficients.

    I would like to identify whether the results are also showing similar magnitudes. I appreciate there are function discrepancies between the LPM and the logit. To do this I use the margins code. Understand the default margins for logit FE is pc1 - which is the probability of a positive outcome (?in the dependent variable?) and I am also looking at a linear prediction for margins. I use the following codes:
    • margins, dydx(*) nose
    • margins, dydx(*)predict (xb)
    However, when I get the results Stata provides most of the coefficients' margins. But for the factor variables (i.survey) and the two i.Control_Variables (Fin_Stress and ARIA) it tells me they are "not estimable". I do not understand why I get this result. (Apologies for the output - I cannot seem to get it to upload despite the dataex installation.)

    . margins, dydx(*) nose

    Average marginal effects Number of obs = 6,185

    Expression : Pr(Dental_consult_YN|fixed effect is 0), predict(pu0)
    dy/dx w.r.t. : Tx5T_Post Tx6T_Post Tx7T_Post 6.survey 7.survey Tx_6T Tx_7T Tx_5T Post Post_7 age 2.ARIA 3.ARIA
    Marital PHI_Yes 1.Fin_Stress 2.Fin_Stress conces GP_consult_YN Smok_Stat
    1.Dental_Status Dental_Health_Problem

    ---------------------------------------------------------------------------------------
    | dy/dx
    ----------------------+----------------------------------------------------------------
    Tx5T_Post | -.0101145
    Tx6T_Post | -.0174234
    Tx7T_Post | .0059322

    survey |
    6 | . (not estimable)
    7 | . (not estimable)

    Tx_6T | 0 (Omitted)
    Tx_7T | 0 (Omitted)
    Tx_5T | 0 (Omitted)
    Post | 0 (Omitted)
    Post_7 | 0 (Omitted)
    age | -.0068795

    ARIA |
    2.ARIA | . (not estimable)
    3.ARIA | . (not estimable)

    Marital | .0144421
    PHI_Yes | .0919837

    Fin_Stress|
    1 | . (not estimable)
    2 | . (not estimable)

    concession | -.0205346
    P_consult_YN | .0747784
    Smok_Stat | -.0852489
    Dental_Status | . (not estimable)
    Dental_Health_Problem | .1586714
    ---------------------------------------------------------------------------------------
    Note: dy/dx for factor levels is the discrete change from the base level.


    Thank you Regards

  • #2
    Dear Siobhan Dickinson,

    I am afraid the probem is even more serious: margins after xtlogit with FE produces meaningless results, as explained here.

    Best wishes,

    Joao

    Comment

    Working...
    X