Saturday, October 01, 2005
I hate Stata. More precisely, I hate Stata help files. [In the voice of Friends' Chandler: Could they make help files less helpful?]
I have unbalanced panels of time series, cross section data. I have three different dependent variables, and two models (full and restricted) for each. I want to test for unit outliers. The recommended approach is leaving out a (country) unit, estimating the model, then using the model to predict the values for the omitted unit. I have to do this for all 39 (countries) units in my sample. Then, I can determine which countries are likely to be outliers. [And regular outlier commands don't work because I have country-years and use robust estimation.]
There is probably some simple code to have it run the regressions and do the predictions by unit without generating 200 pages of output, but I can't seem to figure out how. I can only figure out how to do each country separately which will take FOREVER. [I can't even figure out how to get Stata to save my e(sample) from each regression. The dataset has 1200 observations total, but due to missing data, each regression uses about 450 observations.]
Despite the fact that I just took a lunch break with Brian to have a burrito, I am in no better mood now. Grrrr.
[Update: Getting warmer, I think...]
[Update: Close, but no cigar....]
posted by Michelle @ 2:45 PM,
- At 10/01/2005 9:26 PM, Chris Lawrence said...
Stata's help is useless because they want you to buy the manuals. The manuals are also useless (so much so that I left my Stata 7 set at Millsaps instead of bringing them with me), but in different ways.
Wouldn't the jacknife command do what you want? (My Stata is rusty, to say the least, but it sounds like you want to do a jacknife, or something very much like a jacknife.)
Mind you, if 2/3 of your cases have missing data, you probably have more serious problems than just outliers. This is the point where Gary King comes in and starts beating on you with a multiple imputation tool.
- At 10/01/2005 10:45 PM, Michelle said...
Yes, I found the jackknife command, but it won't do it when data is missing (so I have to save the estimation sample first) and then I have to figure out how to get it to give me detailed results for each case.
Much of the data is missing because countries in the Eastern Bloc just didn't exist before 1991 (the midpoint in my series). And some countries are missing altogether for my sample but they are in my larger dataset. So, Amelia won't work in this case either.
I'm getting closer, though, after reading the user's manual. Should have done that years ago instead of learning basic syntax structure on an as needed basis.