Showing posts with label Stata. Show all posts
Showing posts with label Stata. Show all posts

Tuesday, July 03, 2007

stata 10 graphics: first impression review

baseball graph
(percentage runs and percentage wins for mlb teams. the vertical distance from the regression line can be thought of as the extent to which a team is over/underachieving in terms of wins given its runs scored/runs against)

I made a toy graph this morning, firstly to celebrate the Yankees underachievement given that we are at the halfway point of the season, but secondly to try out Stata's new graphics.* It has changed the graphics menus all around to take advantage of its now allowing child dialogs, although in my opinion it ends up overusing them. If I had a choice between the Stata 10 and Stata 9 menus, I'd probably choose the Stata 9 menus, making this feel not exactly like an upgrade, but that could reflect more my familiarity with Stata 9. The big upgrade, anyway, is the Graphics Editor, but it ended up being not intuitive enough that it clear I would have to do more to figure it out than the simple playing I was hoping for. So the graph above doesn't even end up using it.

In a nutshell: The graphics editor was billed as the big reason for somebody who doesn't have reason to use the new statistical features of Stata 10 to upgrade. My first impression is that it's not enough. I've become pretty used to importing graphs into Illustrator or even just Office and editing them there anyway. I'll let you know if my opinion changes.

* My belief is that you cannot honestly be a liberal and root for the Yankees in any kind of serious way. I'm not kidding. At most you can be one of those untrustworthy liberals, the sort who espouses basic liberal values but then goes and cares more about the fate of pets than children in poverty.

Saturday, June 30, 2007

the boy detective at work

I love the folks at Stata, but right there in the Stata manual:
As always, Stata is 100% compatible with the previous releases...
If only this was true. Instead, when Stata goes to a new version, my collaborator and I have to go through and figure out what parts of our programs have been broken by changes. I've spent the last two hours trying to figure out a bug that has been caused by a change to their -asmprobit- command (alternative-specific multinomial probit, which to my knowledge has never actually been used by a sociologist, and I actually think that's just as well). Whatever the problem is here, it is so ridiculously subtle it is putting my boy detective skills to the test.

I've got a lead, but I don't think I'm going to get this solved before I have to leave to meet people for this Boston Harbor Islands adventure today. Ugh. I'm already pushing it time-wise (if you are wondering why I'm writing a blog post then, it's that I'm waiting on Stata to execute something).

Apropos of nothing, last night I heard Kiss's song "Beth." I've always wondered: do you think the guy is really not going home to his beloved because his band needs to practice? Or, do you think that's just an excuse he's using because he's really out tomcatting around? He is a guy in a metal band, after all.

Monday, June 04, 2007

stata 10 ships june 25

Just announced! I always dreamed of having a midnight release party for a new edition of Stata, but I don't think this time will work either. Anyway, the headline feature of the upgrade is a full-blown graphics editor, which if they implemented it right could just about make up for all the cool things one can do in R (exemplified blogwise nowhere better than here).

Saturday, July 02, 2005

woo-hah! i got you all in czech*

Sometimes here at my desk, I get to feel like a superhero. Because you never know when a Stata Emergency is going to strike in some part of the world, and there are Stata Emergencies that I am the Only One Who Can Solve.

What heinous things can cause a Stata Emergency? Well, in Stata, if you want to create a new macro named -this- that is equal to an existing macro named -that-, the obvious syntax is:
    local this = "`that'"
instead, however, you really want to use:
    local this "`that'"
Amazing, isn't it, these mad Stata skillz I have? Even more remarkable is that the problem caused by using the first expression instead of the second only arises when -that- is longer than 244 characters, and even then it doesn't generate a explicit error in itself but instead just causes often-mysterious problems many lines later in your program.

Remembering to omit an equals sign where intuitively there should be one is kind of like the programming equivalent of one of those ambient party-drinking games where you are supposed to remember to make some particular gesture whenever you say another person's name. It's easy to forget.

Often, the error exists in a problem but only makes a difference when someone wants to use a particular program with an exceptionally long list of variables, a rare enough circumstance that the problem can lurk for months in a program that has circulated widely before somebody encounters the problem and sends the e-mail that causes me to spring into action.**

For some reason I don't quite understand, there seems to be a particular proclivity for long variable lists in the countries of Eastern Europe, places like Poland and Hungary and the Czech Republic. These users are very polite, friendly, and good at providing documenting a programming problem precisely enough so as to make it much easier to figure out and solve. When you are already envisioning yourself a Stata Superhero, it's all the more glamorous to be fighting statistical crimes in Eastern Europe, especially since I can often fix a bug and send a new version of the program in less time than it would take Superman even to fly his faster-than-a-locomotive ass there.

Even so, it's not so easy to work with a file where all the comments are all in Czech. And, since certain languages arrange their consonants and vowels in ways that sometimes seem random from an English-speaking standpoint, I am constantly making errors where I switch around the letters in the variable names and have to look back at each one three times before I get it right. But, of course, the work of a superhero should have its complications.

* Speaking of which, whatever did happen to Busta Rhymes? Your life remains incomplete if you've never heard Dorotha do her Busta impersonation on this song.

** Another issue is that there are a subset of users so trusting and naive as to always believe that a program is correct even when it gives bizarro output; these users cause me occasionally to lie awake at night and wonder what possibly insane ends programs I've written could be being put to at that very moment.

Monday, April 04, 2005

i swoon

The release of Stata 9 has been announced.

Update: Granted, that it's $549 with the complete documentation set (and, I must have the complete documentation set) does take a little of the wobble out of my knees.

Update, 1:30pm: I just got the following message from Stata. My good Stata citizenship is going to be rewarded. As Careyoke and Dorotha would say, Awesomely awesome!
-----Original Message-----
From: [address]@stata.com
Sent: Monday, April 04, 2005 12:48 PM
To: Jeremy Freese
Subject: Stata 9
Hello,
We will be sending you a complimentary copy of Stata 9.
I was going to have a sales person prepare a "ship form" (instructions to
shipping as to what and where to ship your package), but I wanted to
confirm the address with you first.