Teaching and Research Resource

Stata Cheat Sheets

A practical collection of quick-reference materials for students, instructors, and researchers using Stata for data management, statistical analysis, programming, and visualization.

6-page PDF Stata Educational Resource
Preview of the Stata cheat sheets

What Is Included

The collection provides concise examples of frequently used Stata commands, syntax, workflows, and graphical options. Each section can serve as a quick reference during coursework or empirical research.

01

Data Analysis

Commands for descriptive statistics, hypothesis testing, regression, panel data, survey analysis, time-series methods, diagnostics, and postestimation.

Regression Panel Data Survey Data Postestimation
02

Programming

An introduction to macros, matrices, scalars, loops, stored results, temporary files, debugging, and exporting regression output.

Macros Loops Matrices Stored Results
03

Data Processing

Quick-reference commands for importing data, exploring variables, creating new variables, changing data types, summarizing observations, and applying logical conditions.

Import Data Explore Data Generate Variables Data Types
04

Data Transformation

Examples of subsetting, recoding, labeling, reshaping, merging, appending, string manipulation, and exporting cleaned datasets.

Reshape Merge Append Strings
05

Data Visualization

Syntax and examples for scatterplots, histograms, bar charts, box plots, fitted lines, coefficient plots, marginal-effects plots, and combined figures.

Scatterplots Histograms Coefficient Plots Marginsplot
06

Graph Customization

Options for graph colors, text, marker symbols, line patterns, labels, legends, themes, plot regions, and exporting publication-ready figures.

Colors Markers Themes Export Graphs

Download the Complete Collection

Save the complete six-page PDF for use during class, research, data analysis, or independent Stata practice.

Download PDF

Preview the Cheat Sheets

You can scroll through the document below before downloading it.

The preview may not display in every browser. Open the PDF in a new tab or use the download button above.

Attribution and License

These cheat sheets were created by Tim Essam and Laura Hughes and were inspired by RStudio’s cheat-sheet resources.

The materials are shared under the Creative Commons Attribution 4.0 International license. They are presented on this website for educational and reference purposes.

The original materials note that the creators are not affiliated with Stata. Users should consult Stata’s official documentation for current command syntax, software changes, and detailed technical guidance.