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: Re: st: Using -return matrix- to return other rclass matrix results


From   "Lacy,Michael" <Michael.Lacy@colostate.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   re: Re: st: Using -return matrix- to return other rclass matrix results
Date   Sat, 23 Feb 2013 02:59:34 +0000

daniel klein <klein.daniel.81@gmail.com> had written:
>
>I do not fully understand what you are trying to do, but you might be
>overlooking another problem here. You would like to do
>
>tab ..
>return matrix A1 = r(A)
>tab ...
>return matrix A2 = r(A)
>CallSomeOtherProgram ...,
>
>and claim this  "won't work, since -return matrix-, as I understand
>it,  doesn't allow the direct assignment of matrices from r()."
>
>This might be true, but even if you could do the assignment, your code
>would only return matrix A2. Since -tab- is -rclass- (as I understand)
>it will erase any results previously saved in r() -- including A1
>after your second call to -tab-.

Thanks for your ideas here.

My understanding here would  be that since there are two separate
calls to another rclass program, illustrated here by -tab-,
the first return would retrieve the contents of r() as it existed
after the first `tab-, and the second return would capture r()
as it existed after the seond call.  So, I there is not a 
 problem here.

>
>You might also want to have a look into Mata's -st_matrix()- function.
>I am not sure this will help, but it might be worth a shot.

I'll have to thinkf about this one.  Mata certainly is flexible in 
its use of the contents of r(). 

Regards,

Mike Lacy
Dept. of Sociology
Colorado State University
Fort Collins CO 80523



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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