Dear reader, first of all, thanks for stopping by, and showing interest in the Stata Guide! The Guide would not have been possible without the support and encouragement from the community. I have received countless messages, comments, suggestions, and feedback on various articles, all of which have tremendously helped in improving the content. I wanted to write this small article to explain the motivation behind all of this.

Why Stata?

In the field of micro econometrics, and economics in general, Stata is the go-to language. Having being involved in a dozens of projects in institutions like LUMS, the World Bank, DFID, USAID…

Last updated: 27 Feb 2021

In this guide learn how to export Stata tables and regressions to LaTeX to generate customized tables.

Image for post
Image for post

In this Stata guide, learn to generate the following figure where gender information is replaced with easy-to-interpret symbols:

Image for post
Image for post

The aim of this guide is to expand the use of symbols using dingbats fonts that allow for creative freedom to make graphs visually more appealing. The use of symbols also allows us to get rid of legends or text that can fill up the precious space in graphs.

Preamble

Like other guides, a basic knowledge of Stata is assumed. This guide deals with advanced usage of locals, loops, and code structures that require some experience and familiarity with Stata programming. …

In this guide, learn to make spider plots in Stata. We will use the Oxford COVID-19 policy tracker to generate the following graphs:

Image for post
Image for post

In this guide, learn how to make polar plots from scratch in Stata. The polar plot script is also applied to the Eurostat’s weekly deaths dataset to generate excess deaths figures shown below:

Image for post
Image for post

In this guide, learn how to add arrows to lines graphs in Stata as shown in the figure below:

Image for post
Image for post

While the idea of an arrow at the end of a line seems a banal one, it does pose an interesting challenge, since it involves calculating angles in Stata. The core principles behind calculating angles for adding arrows can be used for a lot of interesting visualizations, that will be covered in subsequent guides.

The guide is split in to two parts. Part I covers the fundamentals of angles in Stata, while Part II applies the fundamentals to actual COVID-19 data…

In this Stata guide, learn how to create the following Stream graph using publicly available COVID-19 information on daily cases and deaths from the Our World in Data (OWID) database:

Image for post
Image for post

Stream graphs are a follow-up of the Stacked-area graphs guide. It is recommended that you go through the earlier guide before using this one since the essential building blocks are the same, and the earlier guide explains the steps carefully. …

In this guide, we will learn how to make the following bar graph in Stata that have custom color schemes, automated legends, and labels:

Image for post
Image for post

Two challenges exist with automating bar graphs. First, there is a loss of information that occurs when collapsing or reshaping a dataset. For example, variable and value labels drop, which would typically be used to label graphs. Reshaping of the data is required, in one form or the other, to make bars of different colors. Second, while the graph above looks straightforward to make, individually fixing bars or legends quickly becomes cumbersome. Bar graphs are used…

In the world of data visualizations, color schemes are a essential for making the graphics stand out. An important part of learning how to use colors is an understanding of the color wheel and color harmonies that help define color palettes or schemes. In the first part of this guide, we will briefly introduce these topics. In the second part of the guide we will learn how to define our own color scheme and generate Stata graphs that are fully personalized, customized, and automated:

Image for post
Image for post

Custom color schemes can be used in any type of graphs. For example, in this guide…

Asjad Naqvi

Here you will find information on Stata, COVID-19, and data visualizations.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store