Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   DocStudentAA <[email protected]>
To   [email protected]
Subject   Re: Error message: estimates post: matrix has missing values
Date   Fri, 14 May 2010 12:36:09 -0700 (PDT)


I'm having the same issue.  I tried using the EXACT code from
http://www.stata.com/support/faqs/stat/ivreg.html on the "sysuse auto data"
(i.e. I'm replicating the Stata help example) and I get the same error Bob
is getting "estimates post: matrix has missing values" which on
investigation stems from the fact that Vmatrix is populated with blanks... 
Help!?


Robert L Ostergard wrote:
> 
> 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" <[email protected]> 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 <[email protected]>
> 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/
> 
> 

-- 
View this message in context: http://statalist.1588530.n2.nabble.com/Error-message-estimates-post-matrix-has-missing-values-tp4577699p5056889.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index