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]

Re: st: Margins for interactions terms


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Margins for interactions terms
Date   Mon, 9 Dec 2013 19:43:06 +0000

You asked a similar question before.

http://www.stata.com/statalist/archive/2013-12/msg00300.html

-reg2hdfe- is a user-written program from SSC, as you are asked to
explain. Evidently the author is not an active member of Statalist;
many users, naturally, are not.

Adding code to return e(sample) is documented at -help ereturn-. You
would need to clone the program, find the appropriate place to add
code and take responsibility for what happens. Alternatively, try
emailing the author directly.

Nick
[email protected]


On 9 December 2013 16:45, emanuele mazzini <[email protected]> wrote:
> 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/
*
*   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