I am trying to do a number of things with this regression:
- run a diff-in-diff
- in a logit model
- in a survival analysis framework (discrete time models)
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
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:
Thanks to anyone who can provide help.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]
0 Response to margins coeflegend difficult to understand with 2-way interaction and at()
Post a Comment