Dear Statalisters,

I am trying to do a number of things with this regression:
  1. run a diff-in-diff
  2. in a logit model
  3. in a survival analysis framework (discrete time models)
I used Jenkins' lectures (particularly, no.6) as a starting point and have read all the relevant threads and Stata articles of my knowledge.
This is my code:

Code:
logit event treat##after x1 x2 period period2 , cluster(id)    
margins treat, dydx(after) pwcompare(cimargins effects) at(period==(1(1)10)) at(bcoh==1980) coeflegend post
where:
split: dummy variable ==1 if the relationship ended in time t
treat: dummy ==1 if the individual lives in a state affected by the policy, 0 otherwise
after: dummy==1 if the the individual was born after the policy started
x1 & x2: other independent variables
period: marriage duration
period2: period squared

It's an unbalanced panel in which each marriage has as many rows as the years of marriage. Split==0 except on the last year. Other than split, period and period2, the variables are constant.

I have two issues:

I. I am not managing to plot this with marginsplot (there's an error)
II. When I do it manually, adding -coeflegend post-, I don't understand the labels


The part of the puzzling output is:
Code:
-----------------------------------------------------------------------------------
                  |   Contrast                 Unadjusted
                  |      dy/dx  Legend
------------------+----------------------------------------------------------------
1.after           |
        _at#state |
( 1 1) vs ( 1 0)  |  -.0527861  _b[1.after:1vs1bn._at#1vs0bn.state]
( 2 0) vs ( 1 0)  |  -.0123686  _b[1.after:2vs1._at#0vs0.state]
( 2 1) vs ( 1 0)  |  -.0624848  _b[1.after:2vs1._at#1vs0bn.state]
( 3 0) vs ( 1 0)  |  -.0248322  _b[1.after:3vs1._at#0vs0.state]
( 3 1) vs ( 1 0)  |  -.0720985  _b[1.after:3vs1._at#1vs0bn.state]
( 4 0) vs ( 1 0)  |  -.0371947  _b[1.after:4vs1._at#0vs0.state]
Thanks to anyone who can provide help.