Last modified on 5 February 2014, at 18:00

Stata/Mata

Mata is a matrix language for Stata that is separate from the original ado-style programming. It is an imperative language similar to the C programming language and was designed to be faster for user program dealing with matrices.

VariablesEdit

Variables in Mata have both an eltype and an orgtype. The eltype can be any of: real, complex, string, pointer, struct, numeric (real or complex), or transmorphic (any of the previous). All numbers in stata are stored as 8-byte doubles. The orgtype can be any of: scalar, vector, rowvector, colvector, or matrix.

FunctionsEdit

All functions in Mata are pass-by-reference.