Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Collecting R2 results when running a do-file


From   Amanda Wilford <awilford@rhsmith.umd.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Collecting R2 results when running a do-file
Date   Fri, 14 Sep 2012 06:47:33 -0600

I am running the following do file for over 200 different regressions with multiple years. What command should I use to collect all of the r2s associated with these regressions?

use "/Users/amandawilford/Desktop/CR.dta"
drop if fyear<2003
drop if fyear>2003
drop if ind48>1
drop if ind48<1
reg itotal lsl_gr l1leverage l1cash lAge l1size lstret litotal l1e_index wpeg
predict rr1, res
reg itotal lsl_gr l1leverage l1cash lAge l1size lstret litotal wpeg
predict rr3, res
reg itotal lsl_gr l1leverage l1cash lAge l1size lstret litotal
predict rr5, res
save "/Users/amandawilford/Desktop/Efficieny/e3/2003 ind1.dta"


Amanda L. Wilford



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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index