I will probably not be implementing any suggestion that requests a multi-checkbox style question...
Wow, the way Google Docs presents that data is really annoying for analysis. Normally, each option would be given its own column in the data (as though it were a ‘Yes/No’ like you suggested).
A bit of code from here for splitting a csv field in SPSS:
DEFINE !parse (var=!TOKENS(1) /nbval=!TOKENS(1))
COMPUTE !var=CONCAT(RTRIM(!var),';').
STRING #str(A8).
VECTOR !var (!nbval F8.0).
COMPUTE #beg=1.
LOOP #cnt=1 TO !nbval.
+COMPUTE #str=SUBSTR(!var,#beg).
+COMPUTE #end=INDEX(#str,';')-1.
+DO IF #end=-1.
+ BREAK.
+END IF.
+COMPUTE !var(#cnt)=NUMBER(SUBSTR(#str,1,#end),F8.0).
+COMPUTE #beg=#beg+#end+1.
END LOOP IF #end=-1.
EXECUTE.
!ENDDEFINE.
* Call the macro.
!parse var=c254 nbval=5.
!parse var=c256 nbval=5.
Replace the semicolons above with commas, and it should work. Note that nbval is the number of possible options, and this code will give warnings if fewer are selected.
Actually, what I’d recommend doing for real, is moving the data to a better spreadsheet program like Open Office, doing the split programmatically there (as suggested elsewhere), and then importing the data into SPSS.
It’s software built for doing statistics a long time ago. And it makes certain assumptions about the sorts of data you’re going to be giving it. This is a solution for dealing with Google’s silly nonstandard way of representing multi-punch lists, not a solution to a statistical problem. It’s totally reasonable to process the raw data using some other program or script before sending it to SPSS—it’s what the pros do anyway.
I’m personally using R myself. That’s why I can’t imagine it to be hard is SPSS because. If Yvain has however spent time learning SPSS it might be costly to relearn things in R.
Wow, the way Google Docs presents that data is really annoying for analysis. Normally, each option would be given its own column in the data (as though it were a ‘Yes/No’ like you suggested).
A bit of code from here for splitting a csv field in SPSS:
Replace the semicolons above with commas, and it should work. Note that
nbval
is the number of possible options, and this code will give warnings if fewer are selected.Actually, what I’d recommend doing for real, is moving the data to a better spreadsheet program like Open Office, doing the split programmatically there (as suggested elsewhere), and then importing the data into SPSS.
SPSS is a software build for doing statistics. There should be a way in SPSS to do this that’s better than switching to a different software.
It’s software built for doing statistics a long time ago. And it makes certain assumptions about the sorts of data you’re going to be giving it. This is a solution for dealing with Google’s silly nonstandard way of representing multi-punch lists, not a solution to a statistical problem. It’s totally reasonable to process the raw data using some other program or script before sending it to SPSS—it’s what the pros do anyway.
R is a free—and imo better—alternative.
I’m personally using R myself. That’s why I can’t imagine it to be hard is SPSS because. If Yvain has however spent time learning SPSS it might be costly to relearn things in R.