Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: How to return regression results from a complex column vector in mata back to stata


From   Christophe Kolodziejczyk <ck.statalist@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to return regression results from a complex column vector in mata back to stata
Date   Tue, 2 Aug 2011 18:18:13 +0200

Have your tried mm_smatlist() from the moremata package? I have not
tried, but maybe it is possible to display complex values with it (the
function is for string matrices)
Christophe

2011/8/2 Ben Smythe <ben.solomon81@googlemail.com>:
> Dear statalisters,
>
> currently I am modifying a liml-like estimator in mata. In one of the
> final steps this involves multiplication with a complex scalar (not
> symmetric, but has real eigenvalues) which finally causes the
> estimation results to be a complex column vector. Thus
> st_matrix("name", mat) will not work as it cannot be used with strings
> or complex numbers and returns the error message: 3253  nonreal found
> where real required
> Now I have tried to use locals or macros to move the results from mata
> to stata and I tried to create a new variable to store the results
> using st_store, though this didn't work either.
>
> Essentially what I would like to do in the end is to display the
> column vector of results (with it's standard errors (V), t-statistics
> and confidence intervalls) nicely in the fashion of: ereturn post b V
> I can see the results in mata by typing the name of the results-column
> vector, though it would be nicer to go back to stata and have the
> usual regression output table. If anyone knows a solution to this it
> would be fantastic.
>
> Best,
>
> Ben
> *
> *   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/


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