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 Gentile 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.


Mata – A Guided Tour I

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



Mata – A Guided Tour II




Mata’s functions

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



Advanced programming

Pointers, Structures and Classes




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 2021 edition of this training course will be offered ONLINE on a part-time basis from the 31st of May to the 4th of June 2021 from 10.00 am to 1.30 pm Central European Summer Time (CEST).

Full-Time Student*: € 890.00
PhD Student: € 1135.00
Academic: € 1260.00
Commercial: € 1685.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, Masters or Doctoral 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, program templates and datasets to use during the course), a temporary course licence of Stata valid for 30 days from the beginning of the course.

Individuals interested in attending this online course must return their completed registration forms by e-mail to TStat by the 21st May 2021 (





I authorise the use of my personal data pursuant to Article 13 of L. Decree no 196 / 2003


Mata, Stata’s relatively “low level” built-in matrix compiled language, is similar in many ways to R, Matlab or GAUSS. As such, it cannot be considered a replacement for Stata, nor is it intended to be a stand-alone statistical package in itself.


Due to the ongoing COVID-19 situation, the 2021 edition of this training course will be offered ONLINE on a part-time basis from the 31st of May to the 4th of June 2021.