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

st: Re: moving from Stata to Mata

From   <>
Subject   st: Re: moving from Stata to Mata
Date   Tue, 16 Oct 2007 9:04:00 -0400

For the record, my point was that Tom might be better off creating variables in Stata and then using them as matrices in Mata.

Is a stata variable not a lot like a vector?


-----Original Message-----

From:  Kit Baum <>
Subj:  st: Re: moving from Stata to Mata
Date:  Tue Oct 16, 2007 6:27 am
Size:  1K

Contrary to another poster's comment, st_view() will not help here.  
st_view allow you to access Stata's variables, not matrices or  
"vectors" (note that Stata does not have a vector data type; all  
"vectors" are matrices with a unit subscript on one dimension. Mata  
has true vectors, rowvectors and colvectors).


allow you to do the same with Stata's macros, scalars and matrices.  
They all have one- and two-argument forms. The one-argument form  
allows you to access the Stata object; the two-argument form allows  
you to update the contents (or indeed create) the Stata object. See

help m4_stata

for a complete list of the functions of this nature.

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

On Oct 16, 2007, at 2:33 AM, statalist-digest wrote:

> If one is working with program or do file in Stata and wishes to move
> to Mata within the program to use a Mata function for a matrix or
> vector defined in the Stata program, is this possible?

*   For searches and help try:

*   For searches and help try:

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