Introduction to Stata

Last modified: 2024-06-27


These notes are split into four primary sections:

These sections will generally be presented in sequence. The discussion will alternate between theory and practice. The format will alternate between lecture and exercises. Please ask questions as soon as they arise in your mind. Please provide feedback or voice concerns.

There are two additional sections:

Creation of this document

These notes are published using Quarto. The Stata code is first rendered using a Stata dynamic document. The source code for these notes can be found at for the curious.

All images should link to full-size versions to see detail if needed.

Dark mode can be toggled on via the switch in the top left corner. Images are color-reversed in dark mode to avoid brightness; mouse over them (or click on mobile) to display originals.

Contact information


CSCAR is available for free consultations with PhD statisticians (email to request a consultation).

CSCAR also has GSRAs available for more immediate help. Walk-ins to our office in Rackham are welcomed Monday-Friday 9am to 5pm (Closed Tuesdays 12-1pm). Alternatively, on our website, you can self-schedule into an hour consultation with the graduate students, which can be either remote or in-person (these are usually available same-day or next-day).

CSCAR operates a email for help with statistical questions, feel free to send concise questions to

The current contact for questions about the notes: Josh Errickson (


These notes have evolved over the years thanks to many CSCAR statisticians, including Josh Errickson, Giselle Kolenic, Brady West, Heidi Reichert, and Lingling Zhang.

This material was created for use in workshops and short courses presented by faculty and staff from the Consulting for Statistics, Computing & Analytics Research (CSCAR) at the University of Michigan. No part of this material may be used for other purposes, copied, changed, or sold.