Like many relatively young sociologists I am an occasional, even frequent, user of Stata. While I have been assured- over and over again- by older and wiser heads that SAS is the way to go, I have generally found that Stata serves my needs rather well. It has been, as I have remarked before, quite free of the sort of insanity that often characterizes statistical software.
That is, until today. Today I was betrayed by my best statistical friend.
Today I had the experience of attempting to debug a do-file.* This, in and of itself, is not unusual- I often have to debug do-files as I am not perfect at writing code and do include the occasional typo. Alas, this particular error was quite intractable. I checked my spelling- all correct. I checked my syntax- just fine. I checked my placement of the command- no problem. So far as I could tell, the relevant line of code was perfectly, completely correct. I even tried adding a couple of hard returns before and after the command since, without those, Stata’s interpreter sometimes misses a line. No dice. Somehow, the command seemed entirely beyond my ken.
And then I tried something else: I typed the exact same command in manually through the command line interface, rather than via the do-file. And that, ladies and gentlemen, worked just fine. And in case you don’t believe me, I even took a screenshot:
This is the sort of behavior that I had come to expect from SAS but never, ever, from Stata. My world has been shattered, my faith in life permanently wounded! How shall I recover?
Eh. Whatever. As it turns out, it isn’t that big a deal. I had been running an older program in compatability mode with Stata 8.0, but once I upgraded the commands for Stata 9.2 the problem disappeared. Nevertheless, the damage has been done. I can no longer claim that Stata has been entirely trouble-free.
Et tu, Stata? Et tu?
* For the uninitiated, a do-file is often also referred to as a program, although it has more in common with a batch file. In any case, it's a whole series of commands that the stats package executes quickly rather than doing your stats line-by-line.