Maximum Likelihood Estimation (MLE)

Asjad Naqvi
The Stata Guide
Published in
18 min readJul 5, 2021

--

In this guide, we will cover the basics of Maximum Likelihood Estimation (MLE) and learn how to program it in Stata.

If you here, then you are most likely a graduate student dealing with this topic in a course or programming some estimation command in Stata. But MLEs also have another purpose. They also form the backbone of Machine Learning techniques. In their core essence, MLEs are parametric estimations, where, given some data, and some assumption about the functional form of the data, we need to find the optimal values of a parameter set. These parameters give us a distribution function that is most likely to describe the data we are observing. There are also non-parametric MLEs where the distribution functions are derived from a training data set, or other data that closely resembles our data. For example, if we have a million pictures of cats, we can use them to classify a cat in our own picture.

In this guide we will deal with parametric MLEs that are commonly used in standard econometrics. Here we will introduce the basic concept of MLEs and learn how to apply them in Stata. As a side note, MLEs are not new in Stata. In fact the ml commands exist as far back as the earlier versions of Stata. The earliest documentation I found was in v6 that was in use around 2002-03 but it could easily be much earlier since they are also required for the standard…

--

--

Asjad Naqvi
The Stata Guide

Here you will find stuff on Stata, data visualizations, data wrangling, workflows, and programming.