Open sergiocorreia opened 5 years ago
In a comment on the -reghdfe- branch, I've just submitted a test script which demonstrates that -margins- works fine after -reghdfe- when there are no instrumental variables.
This test script testivreghdfe.zip shows that, after estimation of a fixed-effects IV model with -reghdfe,old-, -margins- does work with the -contrasts- option or with the -dydx- option. However, -margins does not work in the absence of those options.
The test script compares the performance of -reghdfe, old- to the performance of Stata's official --ivregress- and -xtivreg,fe- commands. the comparison suggests that -ivreghdfe- could be compatible with -margins- if its treatment of the constant term were more similar to the treatment accorded the constant by Stata's -xtivreg,fe- command.
Code:
Underlying issue: ivreg2 does not support margins if used with partial()
Possible soln: study when is it valid to use margins+partial