Graphs in Stata

12/02/2009

There’s been a lot of talk around here lately about R, and in particular some criticism about the graphing ability of Stata. I thought it was time someone defended Stata. The manual is hard to get to grips with, but there are a couple of really good things about graphs in Stata. Firstly you can get them to look however you want, even like the ones in excel if you wish. Secondly, it’s relatively easy to write up your own program once you’ve found a style you like. Once this is set up you can label, title, subtitle, show percentages on bars etc. automatically. And then you only need to type programname varname. This is especially useful when you have dozens of graphs to do, and is what we’ve been doing for the Irish Universities Study, an example is below.

Alan’s also done some good ones with confidence intervals here.

Someone sent round an example of a map graph in R, but this is also relatively easy (I managed it so it must be!) to do in Stata with SPAMP. There is a useful guide here. Here’s one I did of Ireland.

0 comments: