Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Katharina (gmx)" <K.Raatz@gmx.de> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Decile means |
Date | Wed, 14 Nov 2012 16:54:01 +0100 |
Dear Statalist,I would like to perform two regressions based on the same panel data. In fact, I am only interested in the intercept estimate from both regressions. Is it possible to simultaneously "statsby" them into the same output file or do I have to merge the outputs afterwards?
Then, I would like to build deciles based on the first intercept estimations (alpha) and calculate the mean within these deciles of both the first (alpha) and the second estimates (alpha'). This is my code so far, it generates the alpha means within the alpha deciles:
sort alpha foreach X of varlist alpha { xtile deciles=`X', n(10) bysort deciles: egen D`X'=mean(`X') drop deciles }Still I don't succeed in calculating the mean of alpha' within the alpha deciles (maybe something like bysort deciles: egen Dalpha_= mean(alpha_) if deciles=`X' within the foreach loop?). I appreciate are any suggestions! Thank you very much, Katharina
* * 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/