User's corner: A little help with Mata from the SSCC
If you are interested in learning Mata, if you teach with Mata, or if you want a reference for commonly used elements of Mata, you won't want to miss An Introduction to Mata, by the University of Wisconsin's Social Science Computing Cooperative (SSCC).
Their tutorial and reference starts with the basics by typing matrix expressions into Mata and seeing the results. They demonstrate matrix operators and subscripting. They progress into how you get Stata data into Mata and vice versa. They then provide overviews of Mata's functions for creating matrices, sorting, reporting descriptive statistics, and inverting matrices.
The tutorial has depth. They describe loops, pointers, and writing your own functions. Helpful examples illustrate all the concepts.
They wrap up with some extended examples, including how to program your own maximum likelihood estimator using Mata's built-in optimizers.
Want to do some even more serious Mata programming? After reading what the SSCC has to offer, consider Bill Gould's book—The Mata Book: A Book for Serious Programmers and Those Who Want to Be.
Or get a quick look at Mata by reading our Mata—Stata's serious programming language page. There you will also find links and information about these and other Mata resources.