Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nahla Betelmal <nahlaib@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: perform regression on minimum number of observations stata |
Date | Mon, 29 Jul 2013 15:32:12 +0100 |
Hi Statalist, my data consists of several years and several industries (each industry contain several firms). I run cross-sectional regressions as follow : forval y=1989/2012 { forval i= 1/57 { reg DV IV_1 IN_2 IN_3 if Industry== `i' & year==`y' } I have two questions please: 1- According to literature, any industry-year regression with less than 15 observations (i.e. 15 firms) should be disregarded. the tricky thing is that almost every industry-year group has more than 15 firms but some are with missing values to perform the regression. Therefore, the regression could be done with less than 15 observation. How can I account for this in the above loop, so regression with less than 15 complete observations produce missing values instead of actual values! 2- the output does not provide information about the matched year and industry. Is there a way to do it? I only need that for reporting purpose. Thank you Nahla Betelmal * * 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/