Dear forum members,

I face the following issue. I am running a logit regression on survey data (individual women from two periods (pre and post 2009) and in two treatment areas (non-BH and BH). This is done in a difference-in-difference setting so at the end I am explicitly interested in the interaction effect.
My function is specified in three ways (basic model, basic+state dummies, basic+state dummies+control variables). By including a factor variable i.surveystate I want to account for state fixed effects. When running my logit regression everything works out fine. As soon as I try to make use of any margins command (e.g. margins, dydx(*); margins, at()) Stata states the marginal effect for the indicator BH (i.BH (dummy)) and for all the different values of the state indicator (i.surveyystate (factor)) are "not estimable". This only happens in model 2 and 3 while Stata supplies me with the marginal effect of BH in model 1. While Stata says the marginal effects for BH and surveystates are not estimable in model 2 and 3 it does give me the marginal effect of other dummy/factor variables though (e.g. muslim, literacy, wealthindex). Below you can find the three model codes I have used as well as the output from model 1 and model 3. Here my issues are shown. Based on this problem I am also not able to use many other commands like mcp, marginsplot etc. as the result of margins for BH is always non estimable. Later I also want to run a model with a binary#continous interaction and face the same issue. This happens no matter if I calculate the interaction effect by hand post2009TPXBH=(post2009TP*BH) or use the factor and # notation (Model 1 as an example of pre-calculated interaction effect, model 3 example of factor notation to crate interaction effect).

Any held would be greatly appreciated!
Kind regards Caspar

Model 1:
Code:
svy:logit teenpreg i.BH i.post2009TP i.post2009TPXBH
margins, dydx(*) vce(unconditional)
Model 2:
Code:
svy:logit teenpreg i.BH i.post2009TP i.post2009TP#i.BH i.surveystate
margins, dydx(*) vce(unconditional)
Model 3:
Code:
svy: logit teenpreg i.BH i.post2009TP i.post2009TP#i.BH i.muslim i.urban i.kanuri i.hhheadmale i.literacy i.wealthindex i.edulevel c.eduyears i.edulevelpartner c.eduyearspartner i.polygamoushh i.surveystate
margins, dydx(*) vce(unconditional)
Example Model 1:
Code:
. svy:logit teenpreg i.BH i.post2009TP i.post2009TPXBH
(running logit on estimation sample)

Survey: Logistic regression

Number of strata   =       148             Number of obs     =          22,035
Number of PSUs     =     2,269             Population size   =  22,012,938,401
                                           Design df         =           2,121
                                           F(   3,   2119)   =          124.16
                                           Prob > F          =          0.0000

---------------------------------------------------------------------------------
                |             Linearized
       teenpreg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
           1.BH |    1.28489   .0830362    15.47   0.000      1.12205    1.447731
   1.post2009TP |  -.2222882   .0485641    -4.58   0.000    -.3175264   -.1270499
1.post2009TPXBH |   -.444609   .1087976    -4.09   0.000    -.6579702   -.2312479
          _cons |   -.341325   .0321343   -10.62   0.000    -.4043431   -.2783069
---------------------------------------------------------------------------------
Code:
. margins, dydx(*) vce(unconditional)

Average marginal effects                        Number of obs     =     22,035

Expression   : Pr(teenpreg), predict()
dy/dx w.r.t. : 1.BH 1.post2009TP 1.post2009TPXBH

---------------------------------------------------------------------------------
                |             Linearized
                |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
           1.BH |   .3059899   .0175181    17.47   0.000     .2716355    .3403444
   1.post2009TP |  -.0521801   .0113664    -4.59   0.000    -.0744706   -.0298896
1.post2009TPXBH |  -.0996184   .0229866    -4.33   0.000     -.144697   -.0545398
---------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.
Example Model 3:
Code:
. svy: logit teenpreg i.BH i.post2009TP i.post2009TP#i.BH i.muslim i.urban i.kanuri i.hhheadmale i.literacy i.wealthindex i.edulevel c.eduyears i.edulevelpartner c.eduyearspartner i.polygamoushh i.surveystate
(running logit on estimation sample)

note: 1011.surveystate omitted because of collinearity

Survey: Logistic regression

Number of strata   =       148             Number of obs     =          14,387
Number of PSUs     =     2,179             Population size   =  14,146,244,185
                                           Design df         =           2,031
                                           F(  52,   1980)   =           31.06
                                           Prob > F          =          0.0000

-----------------------------------------------------------------------------------
                  |             Linearized
         teenpreg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
             1.BH |   .2549566   .1734003     1.47   0.142    -.0851043    .5950176
     1.post2009TP |  -.3188818   .0525346    -6.07   0.000    -.4219091   -.2158545
                  |
    post2009TP#BH |
             1 1  |  -.0673073   .1045352    -0.64   0.520    -.2723146       .1377
                  |
         1.muslim |   .3358439   .0803647     4.18   0.000     .1782381    .4934497
          1.urban |   .0831391   .0599677     1.39   0.166    -.0344655    .2007437
         1.kanuri |  -.2364794    .158307    -1.49   0.135    -.5469404    .0739816
     1.hhheadmale |   .1217891   .0831064     1.47   0.143    -.0411937    .2847718
       1.literacy |   .0651338   .0817359     0.80   0.426    -.0951611    .2254287
                  |
      wealthindex |
          poorer  |   .0918043   .0657692     1.40   0.163    -.0371779    .2207864
          middle  |  -.0885208   .0767987    -1.15   0.249    -.2391332    .0620915
          richer  |  -.2907834   .0869054    -3.35   0.001    -.4612165   -.1203504
         richest  |  -.8785281   .1157358    -7.59   0.000    -1.105501   -.6515549
                  |
       1.edulevel |  -.1782213   .1062559    -1.68   0.094    -.3866034    .0301607
         eduyears |  -.0665808   .0120163    -5.54   0.000    -.0901464   -.0430153
1.edulevelpartner |   .1496471   .1040683     1.44   0.151    -.0544445    .3537388
  eduyearspartner |  -.0227653   .0111104    -2.05   0.041    -.0445543   -.0009763
   1.polygamoushh |  -.0330811   .0575886    -0.57   0.566      -.14602    .0798577
                  |
      surveystate |
         zamfara  |  -.1928214    .151785    -1.27   0.204     -.490492    .1048492
         katsina  |   .2620451   .1615701     1.62   0.105    -.0548152    .5789055
          jigawa  |   .3076793   .1573823     1.95   0.051    -.0009681    .6163268
            yobe  |  -.0157629   .1642379    -0.10   0.924    -.3378553    .3063295
           borno  |   .0095577   .1618743     0.06   0.953    -.3078993    .3270147
         adamawa  |  -.2877648   .1631481    -1.76   0.078    -.6077198    .0321902
           gombe  |   .0768753   .1462841     0.53   0.599    -.2100072    .3637578
          bauchi  |   .3715389   .1514305     2.45   0.014     .0745636    .6685142
            kano  |   .0891833   .1387662     0.64   0.520    -.1829557    .3613223
          kaduna  |          0  (omitted)
           kebbi  |  -.0766893   .1538785    -0.50   0.618    -.3784654    .2250869
           niger  |  -.3141513   .1534187    -2.05   0.041    -.6150257   -.0132768
           abuja  |  -.4034342   .1915664    -2.11   0.035    -.7791213    -.027747
        nasarawa  |  -.0566398   .2138995    -0.26   0.791    -.4761251    .3628455
         plateau  |    -.32141   .1756258    -1.83   0.067    -.6658354    .0230155
          taraba  |   .1213225   .1683685     0.72   0.471    -.2088706    .4515155
           benue  |  -.0591002   .1748634    -0.34   0.735    -.4020306    .2838302
            kogi  |    .432422   .2098261     2.06   0.039     .0209253    .8439188
           kwara  |  -.4152658     .19115    -2.17   0.030    -.7901363   -.0403952
             oyo  |  -.0257761   .1844987    -0.14   0.889    -.3876026    .3360503
            osun  |  -.6566143   .1752572    -3.75   0.000    -1.000317   -.3129118
           ekiti  |   .0372496   .2635448     0.14   0.888    -.4795967    .5540958
            ondo  |  -.2915482   .2125072    -1.37   0.170     -.708303    .1252067
             edo  |  -.3771684   .2374049    -1.59   0.112    -.8427508     .088414
         anambra  |   .0657958   .1944728     0.34   0.735    -.3155912    .4471828
           enugu  |  -.2516204   .1999433    -1.26   0.208    -.6437357    .1404949
          ebonyi  |  -.0660226   .1995881    -0.33   0.741    -.4574413    .3253961
     cross river  |   .4106171   .2347734     1.75   0.080    -.0498048    .8710389
       akwa ibom  |   .0735537    .213957     0.34   0.731    -.3460444    .4931518
            abia  |  -.3390893   .2490943    -1.36   0.174    -.8275962    .1494177
             imo  |   -.618356   .2192515    -2.82   0.005    -1.048337   -.1883747
          rivers  |  -.0649557   .2182536    -0.30   0.766      -.49298    .3630687
         bayelsa  |   .6023436   .1887087     3.19   0.001     .2322609    .9724263
           delta  |   .0971328   .2320194     0.42   0.676     -.357888    .5521536
           lagos  |  -.5527324   .2374296    -2.33   0.020    -1.018363   -.0871015
            ogun  |  -.3748587   .1993162    -1.88   0.060    -.7657442    .0160268
                  |
            _cons |   1.085254   .1637543     6.63   0.000     .7641102    1.406398
-----------------------------------------------------------------------------------
Code:
. margins, dydx(*) vce(unconditional)

Average marginal effects                        Number of obs     =     14,387

Expression   : Pr(teenpreg), predict()
dy/dx w.r.t. : 1.BH 1.post2009TP 1.muslim 1.urban 1.kanuri 1.hhheadmale 1.literacy 2.wealthindex 3.wealthindex 4.wealthindex 5.wealthindex 1.edulevel eduyears 1.edulevelpartner eduyearspartner 1.polygamoushh 1002.surveystate 1003.surveystate
               1004.surveystate 1005.surveystate 1006.surveystate 1007.surveystate 1008.surveystate 1009.surveystate 1010.surveystate 1011.surveystate 1012.surveystate 1013.surveystate 1014.surveystate 1015.surveystate 1016.surveystate
               1017.surveystate 1018.surveystate 1019.surveystate 1020.surveystate 1021.surveystate 1022.surveystate 1023.surveystate 1024.surveystate 1025.surveystate 1026.surveystate 1027.surveystate 1028.surveystate 1029.surveystate
               1030.surveystate 1031.surveystate 1032.surveystate 1033.surveystate 1034.surveystate 1035.surveystate 1036.surveystate 1037.surveystate

-----------------------------------------------------------------------------------
                  |             Linearized
                  |      dy/dx   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
             1.BH |          .  (not estimable)
     1.post2009TP |  -.0649622   .0087651    -7.41   0.000    -.0821517   -.0477727
         1.muslim |   .0665069   .0163947     4.06   0.000     .0343547    .0986591
          1.urban |   .0157526    .011258     1.40   0.162    -.0063258     .037831
         1.kanuri |  -.0462524    .031588    -1.46   0.143    -.1082006    .0156958
     1.hhheadmale |   .0235927   .0162881     1.45   0.148    -.0083504    .0555359
       1.literacy |   .0123473   .0153524     0.80   0.421    -.0177609    .0424555
                  |
      wealthindex |
          poorer  |   .0175353   .0125973     1.39   0.164    -.0071697    .0422404
          middle  |  -.0173779   .0150855    -1.15   0.249    -.0469626    .0122067
          richer  |  -.0586335   .0176686    -3.32   0.001     -.093284   -.0239831
         richest  |  -.1865903   .0255393    -7.31   0.000    -.2366762   -.1365044
                  |
       1.edulevel |  -.0350133   .0214133    -1.64   0.102    -.0770077    .0069811
         eduyears |  -.0127354   .0022819    -5.58   0.000    -.0172106   -.0082602
1.edulevelpartner |   .0281589   .0192538     1.46   0.144    -.0096004    .0659182
  eduyearspartner |  -.0043545   .0021267    -2.05   0.041    -.0085253   -.0001837
   1.polygamoushh |  -.0063313   .0110293    -0.57   0.566    -.0279613    .0152987
                  |
      surveystate |
         zamfara  |          .  (not estimable)
         katsina  |          .  (not estimable)
          jigawa  |          .  (not estimable)
            yobe  |          .  (not estimable)
           borno  |          .  (not estimable)
         adamawa  |          .  (not estimable)
           gombe  |          .  (not estimable)
          bauchi  |          .  (not estimable)
            kano  |          .  (not estimable)
          kaduna  |          .  (not estimable)
           kebbi  |          .  (not estimable)
           niger  |          .  (not estimable)
           abuja  |          .  (not estimable)
        nasarawa  |          .  (not estimable)
         plateau  |          .  (not estimable)
          taraba  |          .  (not estimable)
           benue  |          .  (not estimable)
            kogi  |          .  (not estimable)
           kwara  |          .  (not estimable)
             oyo  |          .  (not estimable)
            osun  |          .  (not estimable)
           ekiti  |          .  (not estimable)
            ondo  |          .  (not estimable)
             edo  |          .  (not estimable)
         anambra  |          .  (not estimable)
           enugu  |          .  (not estimable)
          ebonyi  |          .  (not estimable)
     cross river  |          .  (not estimable)
       akwa ibom  |          .  (not estimable)
            abia  |          .  (not estimable)
             imo  |          .  (not estimable)
          rivers  |          .  (not estimable)
         bayelsa  |          .  (not estimable)
           delta  |          .  (not estimable)
           lagos  |          .  (not estimable)
            ogun  |          .  (not estimable)
-----------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.