Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Margins for interactions terms


From   emanuele mazzini <madsoenistata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Margins for interactions terms
Date   Mon, 9 Dec 2013 17:45:22 +0100

Dear all,

I am estimating a gravity model with exporter-year and importer-year
FE with an interaction term  and the reg2hdfe command, as follows:


reg2hdfe ln(trade_flow) ln(gdp_o) ln(gdp_d) ln(distance) x1 x2 x1*x2,
id1(it) id2(it)

where it and jt are defined as:

egen it = group (iso_o year)
egen jt = group (iso_d year)

After I obtain the estimation results, I try to run the margins
command as to obtain the marginal effect of x1 on the dependent
variable lx and draw a marginsplot.

Unfortunately, when I run -margins- Stata returns me the following error:

e(sample) does not identify the estimation sample.

which seems a bit strange to me, because -ereturn list- gives me the e(N)
function.

Anyone knows how to add the e(sample) to the list of functions that
-reg2hdfe- returns?

Thank you in advance,

Regards,

Emanuele.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index