Maya Tateyama
Maya Tateyama

Reputation: 1

EXCEL conditional if statment equations to SPSS

I appreciate you taking the time to review my question.

I have to write a script in SPSS to clean up some raw questionnaire data exported from Survey Monkey. The analysis has been conducted in Excel by someone else and now I’m trying to determine how to re-perform steps in SPSS.

Here are the excel equations:

=IF(D1="","",IF(Transpose!D37="","E",(Transpose!D37+Transpose!D42)/10))

‘=IF(D1="","",SUMIF(D9:D96,">.5",D9:D96))

‘=IF(D$1="","",IF(RESPONSES!D28="E","E",IF(RESPONSES!D28<0.5,0,1)))

‘=IF(D1="","",IF(D15="E",79-D99,IF(D9="E",85-D99,87-D99)))

‘=IF(E1="","",AVERAGE(RESPONSES!E33,RESPONSES!E71,RESPONSES!E74,RESPONSES!E75,RESPONSES!E87,RESPONSES!E88))

‘=IF(E$1="","",IF(RESPONSES!E9="E","E",IF(RESPONSES!E9<0.5,0,1)))         

‘=IF(D$1="","",IF(ANALYSIS!D17<0.2,0,IF(ANALYSIS!D17<0.4,1,IF(ANALYSIS!D17<0.6,2,IF(ANALYSIS!D17<0.8,3,4)))))

I understand EXCEL commands and functionalities of IDEA and ACL. However as SPSS is new to me, I am totally lost and after HOURS of googling and trying to resolve these commands in SPSS. Any guidance and feedback would be greatly appreciated.

Thank you in advance,

Maya

Upvotes: 0

Views: 147

Answers (1)

JKP
JKP

Reputation: 5417

You can map these Excel commands fairly directly into Statistics. the IF command for a single expression or DO IF/END IF for a block of statements. With DO IF, use COMPUTE for the computation. DO IF's can be nested. For SUMIF, you can use a DO REPEAT/END REPEAT block and put a conditional in the loop. AVERAGE corresponds to the MEAN function in Statistics.

Upvotes: 1

Related Questions