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

st: Re: moving from Stata to Mata

From   Kit Baum <>
Subject   st: Re: moving from Stata to Mata
Date   Tue, 16 Oct 2007 06:26:12 -0400

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:

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