Stata Blogger?

Are you a Stata blogger? Join the aggregator!

Now on Stata-bloggers…

Francis Smart has set up Stata-bloggers, a new blog aggregator for Stata users (modeled after R-bloggers). FE will be contributing there, but there’s lots of other goodies worth checking out from more prolific bloggers.Everyone say “Thank you, Fra…

Continue reading Now on Stata-bloggers…

Plotting restricted cubic splines in Stata [with controls]

Michael Roberts has been trying to convince me to us restricted cubic splines to plot highly nonlinear functions, in part because they are extremely flexible and they have nice properties near their edges.  Unlike polynomials, information at one e…

Continue reading Plotting restricted cubic splines in Stata [with controls]

Quickly plotting nonparametric response functions with binned independent variables [in Stata]

Yesterday’s post described how we can bin the independent variable in a regression to get a nice non-parametric response function even when we have large data sets, complex standard errors, and many control variables.  Today’s post is a …

Continue reading Quickly plotting nonparametric response functions with binned independent variables [in Stata]

Binning a continuous independent variable for flexible nonparametric models [in Stata]

Sometimes we want to a flexible statistical model to allow for non-linearities (or to test if an observed relationship is actually linear). It’s easy to run a model containing a high-degree polynomial (or something similar), but these can become c…

Continue reading Binning a continuous independent variable for flexible nonparametric models [in Stata]

Prettier graphs with less headache: use schemes in Stata

I’m picky about graphs looking nice. So for a long time I did silly things that drove me nuts, like typing “ylabel(, angle(horizontal))” for every single Stata graph I made (since some of the default settings in Stata are not pretty). I always knew tha…

Continue reading Prettier graphs with less headache: use schemes in Stata

Plot polynomial of any degree in Stata (with controls)

FE has been a little sluggish to recover from break. To kick start us back in gear, I’m making good on one resolution by making this FE Week-of-Code. I’ll try to post something useful that I’ve written from the past year each day.It always bugged me th…

Continue reading Plot polynomial of any degree in Stata (with controls)

Visually-Weighted Regression

[This is the overdue earth-shattering sequel to this earlier post.]I recently posted this working paper online. It’s very short, so you should probably just read it (I was actually originally going to write it as a blog post), but I’ll run through…

Continue reading Visually-Weighted Regression

Why visualizing instrumental variables made me less excited about it

Instrumental variables (IV and 2SLS) is a statistical approach commonly used in the empirical social sciences (“instrumental variables” has > 84,000 hits on google scholar) but it often seems to be over-interpreted. I realized th…

Continue reading Why visualizing instrumental variables made me less excited about it

Some shapefile utilities for Matlab (and data transfer to Stata)

Here are some extremely simple but extremely useful functions when working with shapefiles in Matlab.Functions to drop or keep polygons in your workspace based on their attributes (drop_by_attribute.m, keep_by_attribute.m).A simple command to plot all …

Continue reading Some shapefile utilities for Matlab (and data transfer to Stata)

Regression coefficient stability over time (in Stata)

If you’re estimating a regression model with time series or panel data, you often would like to know if the coefficient you’re interested in is changing over time or if its stable for subsamples of the time series or panel.Here’s my simple but handy&nb…

Continue reading Regression coefficient stability over time (in Stata)