Statalist


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

Re: st: AW: matrices stata and mata


From   Carlos Garcia <[email protected]>
To   [email protected]
Subject   Re: st: AW: matrices stata and mata
Date   Mon, 30 Mar 2009 12:39:52 -0600

Martin, thank you very much for the resource and the code; very
helpful, now, I am not stuck anymore. I appreciate it your help.

Regards from Louisiana,

Carlos Garcia
LSU Student

On Mon, Mar 30, 2009 at 9:04 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
>
>
> *************
> sysuse auto, clear
>
> //get tomata package
> cap ssc inst tomata
> di in red _rc
>
> tomata price weight foreign
> mata
> X=(price, weight, foreign)
> // constructed X, admittedly in two steps
>
> // get some matrix from Stata into mata
> mata stata regress price weight foreign
> beta=st_matrix("e(b)")
> // let`s see
> beta
> //push beta back to Stata
> st_matrix("bs", beta)
> end
> //let`s see resulting matrix "bs" back in Stata
> mat l bs
> *************
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Carlos Garcia
> Gesendet: Montag, 30. März 2009 16:30
> An: [email protected]
> Betreff: st: matrices stata and mata
>
> Dear StataList members:
>
> I have a couple of questions about mata and stata:
>
> -In mata, how to get more than one variable from stata in a matrix, in
> one single step?
> -how to read a matrix from mata in stata?
>
> Thanks!
>
> Carlos Garcia
> LSU Student
> *
> *   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/
>

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index