COURSE ID: D-IN19-OL LANGUAGE:

A Gentle Introduction to Stata’s Programming Language Mata

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.

 

At the end of the course, it is expected that participants will be able to independently implement the techniques learnt during the course in order be able to use Mata to work more effectively in Stata. This course is, by its nature, to be considered very much a “hands-on/applied training course”. Each session is composed of both a theoretical component (in which the techniques are explained), and an applied (hands-on) segment, during which participants have the opportunity to implement the techniques under the watchful eye of the course tutor. Throughout the course, theoretical sessions are reinforced by practical examples, in which the course tutor discusses and highlights potential pitfalls and the advantages of individual programming techniques.

This course is of particular interest to 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.

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.

SESSION I: MATA’S TOUR I

  1. Obtaining help
  2. Assignments
  3. Mata’s variables: scalars, vectors, and matrices
  4. Useful (built-in) functions
  5. Null vectors and matrices

 

SESSION II: MATA’S TOUR II

  1. Operators
  2. Subscripting
  3. Errors

 

SESSION III: MATA’S FUNCTIONS

  1. Expressions, conditional and looping statements
  2. Variable types
  3. st_interface and I/O functions
  4. Mata’s mechanics: do and ado-files integration

 

SESSION IV: ADVANCED PROGRAMMING

  1. Pointers and Structures

 

SESSION V: OPTIMIZATION

  1. The optimize suite
  2. The moptimize suite

 

SUGGESTED READINGS

We are currently putting the finishing touches to our 2024 training calendar. We therefore ask that you re-visit our website periodically or contact us at training@tstat.eu should the dates for the course which you are interesting in following not yet be published. You will then be contacted via email as soon as the dates are available.

ONLINE COURSE

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.