There are two straightforward ways to turn string variables into corresponding dummies -- also known as categorical variables -- using Stata. One is an extension of the tab command: tab stringvar, gen(dummy) Another makes use of the fact that you seldom need dummies for their own sake. Usually you want them used in some sort [...]
Archives for posts tagged ‘arguments’
Arguments
Wednesday, 26 November 2008
In an older post I wrote about the program capability in Stata. One thing I didn't say and I find increasingly useful these days is that you can pass arguments to programs. Packaging a set of commands inside a program, to be read once and then invoked as many times as they are needed, is [...]