Stata for stocks

NFLX

The people at StataCorp are on Facebook, and the other day they linked to this blog post by Paul Clist about checking on a stock you might own through clever use of the stockquote Stata command. Last year I bought some Netflix stock when it fell to $77 after the Qwikster fail. I agreed with [...]

Continue reading Stata for stocks

Turn a date into Stata format quickly

There’s a little program that’s shown up more than once now in my housekeeping do-files, so it may be useful enough for a blog post, but it doesn’t quite warrant a spot in c(sysdir_personal) as a stand-alone ado-file. Here: // turn this date to Stata format // if it’s not that way already capture prog [...]

Continue reading Turn a date into Stata format quickly

Control for x

| Gabriel | An extremely common estimation strategy, which Roland Fryer calls “name that residual,” is to throw controls at an effect then say whatever effect remains net of the controls is the effect. Typically as you introduce controls the effect goes down, but not all the way down to zero. Here’s an example using […]

Continue reading Control for x

Recursively building graph commands

| Gabriel | I really like multi-line graphs and scatterplots where the marker color/style reflects categories. Such graphs are both more compact than just having multiple graphs and they make it easier to compare different things. The way you do this is with “twoway,” a lot of parentheses, and the “if” condition. For example: Unfortunately […]

Continue reading Recursively building graph commands

Human rights stats, part 1

I follow @simplystats on Twitter, and on March 1 they had a post that linked to an article in Foreign Policy about a guy who has the coolest job in applied stats. He works here. The original piece described a quick algorithm that you can use to estimate the number of human rights violations using [...]

Continue reading Human rights stats, part 1