Wednesday, 21 April 2010

SPSS Using String Variables in a Binary Logistic Regression

I recently performed a binary logistic regression using SPSS 18 on Windows. I've discovered a rather annoying bug! One of my independent variables was a rather long String variable, with 33 categories. SPSS only recognised two of them though. SPSS has two internal String variables: long String and short String, which is only 8 chars long.

Despite defining the variables as 100 character Strings in the SPSS variable view, the regression only recognised the first 8 characters, and hence cut the whole lot down to two possibilities!

Nice. Solution: recode as some kind of String that is less than 8 characters!

2 comments:

Anonymous said...

Use AUTORECODE on your string variable.

iPhone4S shell telepon said...

This is actually a tremendous web site.