Statalist The Stata Listserver


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

Re: st: get predictions using mata


From   dferry <[email protected]>
To   [email protected]
Subject   Re: st: get predictions using mata
Date   Wed, 30 Aug 2006 16:12:41 -0400

I figured out how to make this little experiment work. But, I am still left w/ the question of how to make a mata matrix that is identical to the coefficient matrix, e(b), resulting from a regression in Stata. Is this possible? 

Danielle Ferry

On Wed, 30 Aug 2006 11:41:16 -0400, dferry <[email protected]> wrote:
> Dear Statalisters,
> 
> I am using -arima- with a panel dataset (possible if you specify the
> "condition" option). But, the postestimation commands don't work, so I am
> attempting to compute predictions and MSE myself, using mata, which I am
> just beginning to learn.
> 
> I wrote the following little function to simulate getting predictions:
> 

> I get the following error msg:
> : test(b, X)
>                   test():  3200  conformability error
>                  <istmt>:     -  function returned error
> r(3200);
> 
> I suspect that part of the problem is the "i" subscripting. In any case,
> can someone please offer advice on how to fix this? Or, even better, has
> anyone already written something to generate predictions?
> 
> Also, after I run -arima-, and get the coefficient matrix e(b), how do I
> get this to be a mata matrix?
> 
> Thank you,
> Danielle Ferry


*
*   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/



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