[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Nuno" <liststata@gmail.com> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Running a regression for a subset of observations issue |

Date |
Fri, 6 Jul 2007 21:07:54 +0100 |

Hello everyone, Does anyone know if Stata is able to cyclically run n regressions on a n observations sample, but at each ith cycle the ith observation is excluded from the sample that will be used in the estimation? The idea is the following: I have a sample of firms which are classified in a particular SIC code. There is a model (Jones (1991)) that for each firm in a given SIC estimates a regression based on the firms that compose that SIC, excluding the firm being analyzed and then uses the estimated coefficients to determine the expected value of a given variable for the excluded firm. This might seem confuse, but the steps are quite straightforward (although I can't implement it in Stata...). So imagine we have in a given SIC code 10 companies. Then, the procedure would do the following: 1. Run the regression Y=a0+a1*X1+a2*x2 and obtain the coefficients estimates for all the 9 observations excluding the 1st one; 2. Use the estimated coefficients to determine the expected value of Y for the first firm; 3. Repeat 1 and 2 for the 2nd, 3rd, 4th ... firms in that SIC, excluding the 2nd, 3rd, 4th ... firm in each step. Controlling for each SIC code is easy (just use -foreach-) but I'm unable to implement steps 1-3... Any ideas? Best Nuno * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Running a regression for a subset of observations issue***From:*Maarten buis <maartenbuis@yahoo.co.uk>

**st: RE: Running a regression for a subset of observations issue***From:*"Steichen, Thomas J." <SteichT@rjrt.com>

- Prev by Date:
**Re: st: RE: RE: Drop variables satisfying a condition** - Next by Date:
**st: RE: Running a regression for a subset of observations issue** - Previous by thread:
**st: RE: bootstrapping standard errors with several estimated regressors** - Next by thread:
**st: RE: Running a regression for a subset of observations issue** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |