Stata 11 help for m3_intro

help m3 intro -------------------------------------------------------------------------------

Title

[M-3] intro -- Commands for controlling Mata

Contents

Command for invoking Mata from Stata:

[M-3] Manual entry Command Description --------------------------------------------------------------------------- m3 mata . mata invoke Mata ---------------------------------------------------------------------------

Once you are running Mata, you can use the following commands from the colon prompt:

[M-3] Manual entry Command Description --------------------------------------------------------------------------- mata help : mata help execute help command

mata clear : mata clear clear Mata mata describe : mata describe describe contents of Mata's memory mata memory : mata memory display memory-usage report mata rename : mata rename rename matrix or function mata drop : mata drop remove from memory matrix or function

mata mosave : mata mosave create object file mata mlib : mata mlib create function library

mata matsave : mata matsave save matrices mata matsave : mata matuse restore matrices mata matsave : mata matdescribe describe contents of matrix file

mata which : mata which identify function

mata set : mata query display values of settable parameters mata set : mata set set parameters

mata stata : mata stata execute Stata command

m3_end : end exit Mata and return to Stata ---------------------------------------------------------------------------

Description

When you type something at the Mata prompt, it is assumed to be a Mata statement -- something that can be compiled and executed -- such as

: 2+3 5

The mata command, however, is different. When what you type is prefixed by the word mata, think of yourself as standing outside of Mata and giving an instruction that affects the Mata environment and the way Mata works. For instance, typing

: mata clear

says that Mata is to be cleared. Typing

: mata set matastrict on

says that Mata is to require that programs explicitly declare their arguments and their working variables; see [M-2] declarations.

Remarks

The mata command cannot be used inside functions. It would make no sense to code

function foo(...) { ... mata query ... }

because mata query is something that can be typed only at the Mata colon prompt:

: mata query (output omitted)

See [M-1] how.

Also see

Manual: [M-3] intro

Help: [M-0] intro


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