Stata - tips and tricks

Links to codes, tutorials, and useful commands.

"Stata - tips and tricks" Stories Page 1 of 1  

Demonstrating the Frisch–Waugh–Lovell theorem with Stata

How would you display bivariate relationships in a multivariate context? Use the FWL theorem to partial out non-essential effects....

Choosing colors for charts: examples and references

After ColorBrewer, now a very popular helper, what's next? Using these two tools, I stored several colors I want to use in my charts made in...

What every STATA user needs to know - how missing values are treated

This is a post for people who are learning Stata. A common source of mistakes is generating a binary variable that should classify observations according to...

Stata resources

My Stata-related posts are here. Other resources are below: Basics UCLA STATA portal Key chapter from the manual: Estimation and postestimation commands Commands for factor variables...

Using STATA: Bar charts with multiple groups using by() and over()

Let's compare Q1 GDP growth vs. the rest of each year, starting in 2009: Here is the code to make the above chart: graph bar ann_...

Using STATA: freduse command, reshape dataset, split years, generate decade-level observations

Question: Is GDP growth systematically slower in the first half of a typical year? (We already know that a "Q1-effect" exists, as Justin Wolfers...

Stata tip: Bar charts

To make a chart of regional differences in GDP per capita in China, download data from China Statistical Yearbook. My final chart looks like this: Getting...

Stata tip: Rotating y labels and y title and adjusting axis title position

We have the following time series: twoway (line ppp year if CEE==0, sort lwidth(*2) lcolor(midgreen)), /// graphregion(color(white)) /// xsize(10) ysize(7) /// title(...

Page 1 of 1