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.

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.


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






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



Pointers and Structures



The optimize suite
The moptimize suite



An Introduction to Stata Programming, Christopher F. Baum, Second Edition, Stata Press 2016
The Mata Book: A Book for Serious Programmers and Those Who Want to Be, William Gould, Stata Press 2018

Due to the ongoing COVID-19 situation, the 2022 edition of this training course will be offered ONLINE on a part-time basis on the 20th-21st-22nd and 27th-28th of June from 10.00 am to 1.30 pm Central European Summer Time (CEST).

Full-time students*: € 890.00
Ph.D. Students: € 1140.00
Academic: € 1320.00
Commercial: € 1770.00


*To be eligible for student prices, participants must provide proof of their full-time student status for the current academic year. Our standard policy is to provide all full-time students, be they Undergraduates or Masters students, access to student participation rates. Part-time master and doctoral students who are also currently employed will however, be allocated academic status.


Fees are subject to VAT (applied at the current Italian rate of 22%). Under current EU fiscal regulations, VAT will not however applied to companies, Institutions or Universities providing a valid tax registration number.


The number of participants is limited to 8. Places will be allocated on a first come, first serve basis. The course will be officially confirmed, when at least 5 individuals are enrolled.


Course fees cover: teaching materials (handouts, Stata do files and datasets to used during the course) and a temporary licence of Stata valid for 30 days from the beginning of the course.


Individuals interested in attending this course must return their completed registration forms by email ( to TStat by the 10th June 2022.

Per richiedere ulteriori informazioni o il modulo di registrazione si invita a compilare il seguente form oppure inviare una mail a





Termini e condizioni*
Ho letto la Privacy Policy

Accetto il trattamento dei dati


The objective of Our Gentile Introduction to Stata’s Programming Language Mata course is to offer participants a softer, but nonetheless extensive introduction into Mata’s programming capabilities.


Due to the current pandemic situation, the 2022 edition of this training course will now be offered ONLINE, on a part-time basis on the 20th-21st-22nd and 27th-28th of June.