More Organs → More Human

Stupid things I've figured out so that you don't have to.


Site Feed

Sunday, May 20, 2007

Mixed-Effects Drinking Game

While trying to figure out how to get SPSS to calculate a mixed-effects model, I have accidentally invented a new drinking game. To play, you'll need the following:

  1. A latop with a relatively recent copy of SPSS installed;

  2. Data with both fixed and random effects;

  3. A bottle of the liquor of your choice. I suggest either some quality tequila or some ice-cold Jägermeister.



Construct your model, and have SPSS run it. You'll probably get an error message. If not, take two shots and pass the laptop to the next player, you lucky S.O.B. Otherwise, take shots according to the following schedule:

"Model cannot be fitted because number of observations is less than or equal to number of model parameters." — one shot, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax.

"Iteration was terminated but convergence has not been achieved. The MIXED procedure continues despite this warning. Subsequent results produced are based on the last iteration. Validity of the model fit is uncertain." — two shots, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax, or after changing some of the parameters in the "Estimation" dialog box.

"The final Hessian matrix is not positive definite although all convergence criteria are satisfied. The MIXED procedure continues despite this warning. Validity of subsequent results cannot be ascertained." — three shots, and try again after specifying a different covariance type in the "Random" dialog box or in the "/RANDOM" parameter of your syntax. This one gets three shots because, in spite of its warnings about the "validity of subsequent results", it apparently gives perfectly usable output... except when it doesn't. Nobody seems to be able to tell me if there's any way to tell if, when presented with this error, the user should be worried about the "validity of subsequent results", or if he/she should just go ahead and use them. Hence the extra shots.

Eventually, you'll either pick a covariance type that doesn't error out, or you'll fall over drunk.

Note how the solution is basically the same for all of those? A surprisingly large number of statisticians and websites seem to advocate "blindly changing covariance type until you get one that works" as the proper way to deal with mixed-effects models in SPSS. I'm becoming convinced that nobody actually understands mixed-effects models, and that it's all some sort of conspiracy to prevent us from getting interpretable data. Really, from what I can tell, being wasted while trying to deal with SPSS's mixed-effects output couldn't make things any more difficult, and the more I think about it, the more it seems like that those error messages might actually make more sense with a couple of tequila shots under my belt.