COURSE OVERVIEW

Mata is Stata’s powerful extremely FAST built-in matrix compiled programming language, similar to R, Matlab and GAUSS. One of the main drawbacks in learning Mata however, is that the Reference Manual, whilst extremely detailed, offers little advice on how Mata can be actively implemented. The objective of our Gentle Introduction to Stata’s Programming Language Mata course is to offer participants a softer, but nonetheless extensive introduction into Mata’s programming capabilities. As such, the opening sessions offer a “guided tour of Mata” focusing on general considerations, such as when the use of Mata is either justified or warranted, offering participants an essential overview of Mata’s syntax and it’s principle commands. Later sessions illustrate Mata’s functions, built-in libraries and how Mata’s operators (such as functions, pointers and structures) and code can be effectively integrated in both user written and official Stata routines to obtain significant increases in the speed in which Stata is able to execute your work.

 

TARGET AUDIENCE

Researchers in any field interested in learning Stata’s programming matrix language. Ph.D. students and researchers interested in extending their existing knowledge of Mata.

 

PREREQUISITES

A good knowledge of do files programming and a basic knowledge of ado files programming is required. The knowledge of alternative “low-level” and matrix programming languages may greatly enhance the understanding of more advanced topics like pointers, structures and classes.


PROGRAM

SESSION I: MATA’S TOUR I

  • Obtaining help
  • Assignments
  • Mata’s variables: scalars, vectors, and matrices
  • Useful (built-in) functions
  • Null vectors and matrices

 

SESSION II: MATA’S TOUR II

  • Operators
  • Subscripting
  • Errors

 

SESSION III: MATA’S FUNCTIONS

  • Expressions, conditional and looping statements
  • Variable types
  • st_interface and I/O functions
  • Mata’s mechanics: do and ado-files integration

 

SESSION IV: ADVANCED PROGRAMMING

  • Pointers and Structures

 

SESSION V: OPTIMIZATION

  • The optimize suite
  • The moptimize suite

 

COURSE REFERENCES