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

From |
Robert L Ostergard <orobert@unr.edu> |

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

Subject |
Re: Error message: estimates post: matrix has missing values |

Date |
Mon, 15 Feb 2010 20:19:34 -0800 |

Hi, Thanks for being willing to take a look at this. After running the mat list Vmatrix command, it was obvious that there was a problem, given the whole matrix is missing values. But now I'm at a loss as to why. I'm guessing there is something wrong with the code now. Given my limited knowledge of matrix, I tried to follow the procedure set out in the webpage: http://www.stata.com/support/faqs/stat/ivreg.html . But obviously, I missed something. Thanks for anything you can help with here. Bob. This is the code: **second stage equation xtreg Y2 Y1hat X1lag1 X2lag1 X3lag1 X4lag1, re rename Y1hat Y1hold rename Y1lag1 Y1hat */original Y1 replacing predicted Y1 predict double res , e rename Y1hat Y1lag1 rename Y1hold Y1hat replace res = res^2 summarize res scalar realmse = r(mean)*r(N)/e(df_r) matrix bmatrix = e(b) matrix Vmatrix=e(V) matrix Vmatrix = e(V)*realmse/e(rmse)^2 ereturn post bmatrix Vmatrix, noclear bmatrix[1,6] Y1hat X1lag1 X2lag1 X3lag1 X4lag1 _cons y1 3.1597052 1.6225073 -3.9195477 729.46403 .06494996 -459.83919 symmetric Vmatrix[6,6] Y1hat X1lag1 X2lag1 X3lag1 X4lag1 _cons Y1hat . X1lag1 . . X2lag1 . . . X3lag1 . . . . X4lag1 . . . . . _cons . . . . . . On 2/15/10 6:33 PM, "Stas Kolenikov" <skolenik@gmail.com> wrote: Please post your code. From your description, it is not possible to disentangle what's going on. You would also want to mat list bmatrix mat list Vmatrix to find out who's the culprit of the error message. On Mon, Feb 15, 2010 at 5:06 PM, Robert L Ostergard <orobert@unr.edu> wrote: > Hi, > > I'm hoping somebody can help me with this problem. > > I'm running a 2sls random effects panel model. Because there of the way > data > are reported and the social phenomena involved, we have lags in the first > and second stage, such that the model looks like this > > Y1(t-1) = a + b1Y2(t-2) + b2X1(t-2) + e > Y2 = a + b1Y1(t-1) + b2X1(t-1) + e > > Because we think Y1 is weekly endogenous, we are not using the xtivreg > procedure in stata and are using the separate two stage format needed. > > We are using the basic procedure spelled out in the Stata post for this: > http://www.stata.com/support/faqs/stat/ivreg.html . > > However, when we get to the final step, ereturn post bmatrix Vmatrix, > noclear, we get the estimates post: matrix has missing values. > > I have a basic understanding of matrix and the general rules, but the data > themselves contain no zeroes and there are no missing data. Is this being > caused by the panel design (we are using xtreg to estimate the equations). > The basic question is: how do I solve the problem so we can get the correct > standard errors? > > Any help is certainly appreciated. > > Bob > > > > * > * 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/ > -- Stas Kolenikov, also found at http://stas.kolenikov.name Small print: I use this email account for mailing lists only. * * 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/ * * 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/

**References**:**Re: Error message: estimates post: matrix has missing values***From:*Stas Kolenikov <skolenik@gmail.com>

- Prev by Date:
**RE: st: Supertitle/Column equation labels in -xml_tab-** - Next by Date:
**st: an egen command** - Previous by thread:
**Re: Error message: estimates post: matrix has missing values** - Next by thread:
**st: RR for mortality data set??** - Index(es):

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