Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Regression by industry and year excluding firm i |
Date | Wed, 8 Jan 2014 18:43:02 +0000 |
This question is difficult to answer literally -- which results do you seek? -- but you need to initialise variables and then save e-class results to those variables each time round the loop. In principle, it is exactly the same idea as already used. You may find http://www.stata-journal.com/sjpdf.html?articlenum=st0137 instructive. That said, my prejudice is that it is better to save confidence intervals rather than P-values. Nick njcoxstata@gmail.com On 8 January 2014 16:24, Abdalla, Ahmed <ahmed.abdalla@kcl.ac.uk> wrote: > Thanks Nick , life gets really better after your code did the job for me ! > One model will not be the desired methodology in my case,as if you remember I use the same model but for each group of two digit SIC code and fiscal year excluding firm i, then I use the estimated coefficients from each group industry-year for firm i . So I will have to use the second way you mentioned which is to save inferential results from each model, but would that require editing your code ? would you mind showing me how to do that, so I can see the significance of the regressions coefficients mean please ? > > Many thanks > Ahmed > > > > ________________________________________ > From: owner-statalist@hsphsun2.harvard.edu <owner-statalist@hsphsun2.harvard.edu> on behalf of Nick Cox <njcoxstata@gmail.com> > Sent: 08 January 2014 16:13 > To: statalist@hsphsun2.harvard.edu > Subject: Re: st: Regression by industry and year excluding firm i > > Thanks for this. > > If you fit separate models, you can't then pretend that this is > equivalent to fitting one model. Either one model makes sense, in > which case fit it, or you need to save inferential results from each > model as you calculate it. I don't see that there is a third way. > > Nick > njcoxstata@gmail.com > > > On 8 January 2014 16:07, Abdalla, Ahmed <ahmed.abdalla@kcl.ac.uk> wrote: >> Dear Nick >> I just want to thank you for the code. I replicated one study from the literature that used SAS, and I got almost the same results for regressions by industry (two digit SIC code) and fiscal year excluding firm i. I can confirm now that the code works perfectly!! Thanks again! >> >> One more question, after I get the intercepts and coefficients b0 b1 b2 b3 b4 b5 b6 from regressions by industry and fiscal year , is there a code to test the significance of the coefficients mean from the regressions ? I used to see the significance from the regress command output, but since I executed the regressions in a different way using the loop you recommended, how can I see the significance of the regressions coefficients mean for the entire sample ? >> <snip> * * 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/