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

From |
"Rachel Bouvier" <[email protected]> |

To |
<[email protected]> |

Subject |
Re: st: two stage model variance estimators |

Date |
Fri, 16 Sep 2005 07:57:03 -0400 |

Hi Robert - I was thinking about this last night, and you're right - it's not the numbr of panels. Since year and year squared are my only x variables, then of course it will be collinear if I pool them, since every country will have exactly the same xs. And I agree with you about not trusting the results. This was a project I did some years back, and I was trying to revisit it and see if I could clean it up a little. Thanks so much for your time and suggestions. Best, Rachel Rachel Bouvier Assistant Professor of Economics University of Southern Maine 11 Chamberlain Avenue Portland, ME 04104 (207) 228-8377 >>> [email protected] 09/15/05 9:09 PM >>> Hi Rachel, it's not evident to me what's going on ... the number of periods doesn't sound like the reason , but anyway I wouldn't trust the individual regressions either if run over a sample of 8 to 17 observations (5 to 14 df's is truly small) and the predicted y's are based on a weak statistical exercise. Again, I don't see where the collinearity arises when you pool your data, but in general I would just recommend that rather than running n-regressions with almost no degrees of freedom each, that you group countries somehow (e.g. developed, lat america, sub-saharan or something like that) and estimate regressions this way. That way you should be able to pool hopefully without problem, reduce the no. of parameter estimated and have more confidence in the quality of your y predicted. cheers, robert On 9/15/05, Rachel Bouvier <[email protected]> wrote: > Yes, that's probably it. I don't have the same number of years for each > country. For some countries I only have 8, and for some countries I > have as many as 17. I should have thought of that. Thanks again. -R > > >>> [email protected] 09/15/05 5:41 PM >>> > how many years do you have? > > On 9/15/05, Rachel Bouvier <[email protected]> wrote: > > >>> [email protected] 09/14/05 7:55 PM >>> > > it would actually help if you could sent your commands to the list > so > > that we see what's going on, > > best > > robert > > > > Of course. Thank you for your time. > > > > My first model is regressing the log of GDP on the year (ie, 1996) > and > > the square of the year (ie, 3984016). Originally, I ran this model > > separately for 30 countries. I then obtained the predicted value of > the > > log of GDP for each of those countries (by using -predict-) and used > it > > in a second model. > > > > The suggestion was to interact year and year squared with each of > the > > countries in the dataset so that I could put them all in one > regression, > > using the country dummies and the -noconst- option. Seems sensible, > but > > when I tried it, Stata dropped all the country dummies. Here was my > > code (I know there are more parsimonious ways to do this, but...): > > > > *All the countries are given an index from 1 to 30.* > > gen mol =1 if index== 1 > > replace mol =0 if index~= 1 > > gen arm =1 if index== 2 > > replace arm =0 if index~= 2 > > > > etc. This generated dummies with 1 if the observation belonged to > that > > country (Moldova is #1, for example). > > > > Then, I interacted the dummies with both year and year squared: > > > > gen yrmol=year*mol > > gen yr2mol=yearsq*mol > > gen yrarm=year*arm > > gen yr2arm=yearsq*arm > > > > etc. > > > > Finally, I ran a regression that looks like: > > > > regress lngdp yrmol yr2mol yrarm yr2arm ... mol arm ... , nocons > > > > where mol = Moldavia, arm = Armenia, and so on. > > > > When I run this, I get the following (truncated): > > > > lnpppc1 | Coef. Std. Err. t P>|t| [95% Conf. > > Interval] > > mol | (dropped) > > arm | (dropped) > > yrmol | .2019759 1.003532 0.20 0.841 -1.772746 > > 2.176698 > > yr2mol | -.0001006 .0005037 -0.20 0.842 -.0010917 > > .0008904 > > yrarm | .149713 .4002733 0.37 0.709 -.6379338 > > .9373598 > > yr2arm | -.0000744 .0002011 -0.37 0.712 -.0004702 > > .0003214 > > > > However, when I run the following: > > > > regress lngdp year yearsq if index ==1 > > > > for example, I do get results. That is what I did in order to get > the > > predicted variables for the second stage. > > > > Anything jump out at you? Again, thank you for your time and > patience. > > -Rachel > > > > >>> [email protected] 09/14/05 7:55 PM >>> > > it would actually help if you could sent your commands to the list > so > > that we see what's going on, > > best > > robert > > > > On 9/14/05, Rachel Bouvier <[email protected]> wrote: > > > Hi again. I tried interacting my xs with country specific dummies > > and > > > running them in a single equation as suggested. Stata is dropping > > the > > > country dummies, even though I specify the nocons option. (I > > remember > > > now that this was why I had originally run it in 30 different > > equations > > > - it works fine that way, but not if I put them all into one > > equation.) > > > Am I doing something wrong? It could be because xsq is the > square > > of > > > x, but I don't understand why stata would let me do it for an > > individual > > > country but not together. Sorry for being obtuse. -Rachel > > > > > > >>> [email protected] 09/13/05 4:50 PM >>> > > > a possible solution could be to run in a single model the > equation > > > > > > (1) y = b1 x + b2 xsq > > > > > > interacting your x's with country specific dummies. > > > > > > In other words, you could run a fully interactive model which is > > > equivalent to running 30 different regressions but in a single > > > equation. (make sure you include the country specific dummies too > > that > > > would account for the constant in your separate regressions and > > > specify the nocons option). > > > > > > hope this helps. > > > robert > > > > > > > > > On 9/13/05, Rachel Bouvier <[email protected]> wrote: > > > > Dear statalisters * > > > > > > > > I am confronting a problem much like that described by James > > Hardin > > > in volume 2, issue 3 of the Stata Journal, "The robust variance > > > estimator for two-stage models," where he gave an illustration of > > Stata > > > code to construct the Murphy-Topel variance estimator. > > > > > > > > I am using a variable (call it yhat), predicted in a first > (series > > > of) equations, as a regressor in my second equation. > > > > > > > > In other words, my first (series of) regressions looked like > this: > > > > (1) y = b1 x + b2 xsq > > > > > > > > Then, I predicted yhat from that regression, and used that in a > > > second regression: > > > > (2) z = b1 yhat + b2 x2 + b2 x3* > > > > > > > > I say "series of" regressions because I have a panel of 30 > > countries. > > > Rather than run one panel data regression and predict each > > country's > > > yhat from that, I ran each country as a separate regression, not > > wanting > > > to assume that they could be pooled. In other words, I ran > equation > > (1) > > > 30 different times, for each country in the dataset. (It seemed > to > > make > > > sense at the time, to both me and my committee!) > > > > > > > > Therein lies my problem. I would like to adjust the standard > > errors > > > for the fact that I predicted yhat, but as I ran a different > > regression > > > for each country, the solution is not as easy as constructing the > > > Murphy-Topel estimator. Does anyone have any suggestions? Any > help > > > would be much appreciated, before I dive into something that is > > > undoubtedly over my head. Thanks. > > > > * > > * 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/ > > > > * > * 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/ > > * > * 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/ > * * 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/ * * 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/

- Prev by Date:
**st: RE: Why does TRUNCREG cannot find the MLE estimate?** - Next by Date:
**Re: st: two stage model variance estimators** - Previous by thread:
**Re: st: two stage model variance estimators** - Next by thread:
**Re: st: two stage model variance estimators** - Index(es):

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