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]

From |
Natasha Agarwal <agarwana6@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: margins on continuous interactions. |

Date |
Mon, 9 Dec 2013 10:44:51 +0530 |

Dear Alfonso, So x4 in my case represents 27 industries, and each industry has a value. For instance, x4 for industry one is 0.15, but for industry 2 is 0.20. The reason I want to use margins so that I am able to get the p-values and the confidence intervals for x3 for each value of x4. Besides, I want to plot a marginsplot for the same. Can someone tell me if the scaling is an issue in using the margins command in my case, and whether to use noestimchek option is correct ? Best, Natasha On Fri, Dec 6, 2013 at 5:43 PM, Alfonso Sanchez-Penalver <alfonso.statalist@gmail.com> wrote: > Hi Natasha, > > On a different note to what Jeff suggested you are only introducing the interaction term between x3 and x4, not the actual levels of the variables. You then want to know the marginal effect of x3 at x4=0.15. That is simply the coefficient on the interaction term times 0.15. There is no variation. So what are you expecting margins to do? > > Best, > > Alfonso Sanchez-Penalver > >> On Dec 6, 2013, at 12:33 AM, Natasha Agarwal <agarwana6@gmail.com> wrote: >> >> Dear Jeff, >> >> Thank you for your help. >> >> The codes are as follows >> >> ****** >> xtset firm year >> xtreg y x1 x2 c.x3#c.x4 i.year, fe vce(robust) >> margins, dydx(x3) at(x4=0.15) >> >> ***** >> >> In the above codes: y = varies at firm and time, x1 = varies at firm >> and time, x2 = varies at firm and time, x3 = varies at industry region >> and time, x4 = varies at industry only. >> >> I looked at the advised archives Statalist option, and I went ahead >> with it. However, I am not sure if noestimcheck is the right option? >> Can you please explain me if possible on how would one know when to >> use the noestimcheck option? >> >> Thank you very much again and sorry for taking your time. >> >> Best, >> Natasha >> >> >> On Thu, Dec 5, 2013 at 10:53 PM, Jeff Pitblado, StataCorp LP >> <jpitblado@stata.com> wrote: >>> Natasha Agarwal <agarwana6@gmail.com> is using -margins- after -xtreg, fe- but >>> is getting (not estimable) for the requested marginal effect: >>> >>>> I estimate a fixed effect model xtreg y x1 x2 x3*x4 year dummies, fe >>>> vce(robust) >>>> >>>> where y, x1, x2, are firm level variables. x3 changes over >>>> industry-region-year. while x4 changes only over industry. After this, I >>>> estimate margins, dydx(x3) at(x4 = 0.15). I get a not estimable error. I >>>> then try to use the noestimcheck option, and state margins, dydx(x3) >>>> at(x=0.15) noestimcheck. and I get an output. However I am not sure whether >>>> it is correct to use the noestimcheck option here. >>> >>> Natasha identifies several grouping variables (firm, industry, region, year) >>> but does not indicate which grouping variable was -xtset- as the panel >>> variable so it is very difficult to reproduce the problem. >>> >>> Even if we cannot have access to Natasha's data, showing us all the relevant >>> Stata code would have been more helpful. Something like >>> >>>> The code I used was >>>> >>>> ***** BEGIN: >>>> xtset ???panelvariable??? >>>> xtreg y x1 x2 c.x3#c.x4 i.year, fe vce(robust) >>>> margins, dydx(x3) at(x4=0.15) >>>> ***** END: >>> >>> I suspect Natasha is experiencing scaling problems. -margins- can have a >>> difficult time in checking for estimable functions when crossed continuous >>> variables are on very different scales. >>> >>> If my suspicions are correct, then I imagine the advice at the end of the >>> following post is relevant for Natasha as well. >>> >>> http://www.stata.com/statalist/archive/2011-07/msg00514.html >>> >>> --Jeff >>> jpitblado@stata.com >>> * >>> * 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/ > > * > * 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/

**Follow-Ups**:**Re: st: margins on continuous interactions.***From:*Alfonso Sánchez-Peñalver <alfonso.statalist@gmail.com>

**References**:**Re: st: margins on continuous interactions.***From:*jpitblado@stata.com (Jeff Pitblado, StataCorp LP)

**Re: st: margins on continuous interactions.***From:*Natasha Agarwal <agarwana6@gmail.com>

**Re: st: margins on continuous interactions.***From:*Alfonso Sanchez-Penalver <alfonso.statalist@gmail.com>

- Prev by Date:
**st: creating a table of own design** - Next by Date:
**Re: st: Offset variable** - Previous by thread:
**Re: st: margins on continuous interactions.** - Next by thread:
**Re: st: margins on continuous interactions.** - Index(es):