Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

margins postestimation command not supported #11

Open
sergiocorreia opened this issue Nov 27, 2018 · 1 comment
Open

margins postestimation command not supported #11

sergiocorreia opened this issue Nov 27, 2018 · 1 comment

Comments

@sergiocorreia
Copy link
Owner

Code:

sysuse auto, clear
reghdfe price weight i.foreign (length=gear), absorb(turn trunk) old
margins i.foreign

Underlying issue: ivreg2 does not support margins if used with partial()

ivreg2 price weight i.foreign, partial(weight)
margins i.foreign

Possible soln: study when is it valid to use margins+partial

@meadover
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants