Wednesday, March 19, 2008

Can’t Someone Else Do It? Best Stata Command Ever!

To perform my research I use a statistical software package called Stata. Stata is a great program, but I have always had this problem where I run a regression and get a bunch of output. I then want to put this output in a particular format that is standard to the economic literature, so I have to cut and paste the output into Excel. Then I have to spend 10 minutes or so reformatting what I have pasted into Excel so I can put the results into a paper. This may not sound like a big deal, but I would say on average I probably spend at least ½ to 1 hour a week doing this. I thought to myself……

Can’t Someone Else Do It?

The answer is yes, I have two great graduate student co-authors who often put together results for me (although I do a lot myself, particularly when I’m working with my advisor). But I would rather have my co-authors working on improving the paper than making pretty tables. So I asked google…

Can’t a Computer Do It?

The answer is yes! Thanks to John Luke Gallop. He wrote a wonderful little program that with one line of extra code that takes 30 seconds to write saves minutes. The command put the results directly into a word document, cutting out the formating step.

The command is called outreg (for those of you who use Stata type “help outreg” in your command prompt.)

So what does this teach us. Tasks that can be automated, require a fixed cost. I’m sure Dr. Gallop, spent a while writing the program. But once that task is automated others can use the knowledge gain through conversion to make the process easier for themselves. There is a large economic literature on this idea typically referred to as spillovers. As knowledge grows productivity increases, just like once I learned outreg, I taught it to my two co-authors. Now we are all more productive.

Thank you John Luke Gallop!

Bookmark and Share

1 comment:

RossAndKate said...

I wish that there were a general command like that. That way, I could just type in

CantSomeoneElseDoThat laundry

and magically, my laundry would be done!