On another list someone asked about transforming dichotomous items back to Likert items.
developerworks is down, but am I correct that there is an extension command to do this 10000 ==> 1 01000 ==> 2 00100 ==> 3 00010 ==> 4 00001 ==> 5 ? Also if someone has used survey monkey is there a way to ask it to return the data collapsed to Likert items? -- Art Kendall Social Research Consultants
Art Kendall
Social Research Consultants |
Administrator
|
Art, why not just do something like this?
data list free / d1 to d5 (5f1). begin data 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 end data. list. compute ## = 0. do repeat d = d1 to d5 / # = -4 to 0. - compute ## = ## + d*10**abs(#). end repeat. compute combined = lg10(##) * -1 + 5. formats combined (f5.0). list. OUTPUT: d1 d2 d3 d4 d5 combined 1 0 0 0 0 1 0 1 0 0 0 2 0 0 1 0 0 3 0 0 0 1 0 4 0 0 0 0 1 5 Number of cases read: 5 Number of cases listed: 5 The basic code probably be inserted in a macro and made a little more general (e.g., able to handle any number of binary digits). HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
In reply to this post by Art Kendall
Assuming the result is a string (or can be made a string) and there is a single 1 in the string.
Simply use INDEX function to return the location of the 1.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
There is an option to export data in a spreadsheet format with the columns condensed, this will give you data in a single column (if you have set it up as a likert scale)
|
Administrator
|
In reply to this post by David Marso
Hey old-timer, I assume you mean CHAR.INDEX, right? :-)
I considered that approach too, but the subject line indicated it was a series of 0/1 variables, which I assumed would be numeric. But I have not worked with SurveyMonkey files enough to know whether that was a good assumption. ;-)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Survey Monkey gives you the option of obtaining the data in numeric form or in string form. HTH. martin
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: Monday, April 15, 2013 9:55 AM To: [hidden email] Subject: Re: Survey monkey returned Likert items as 5 zero/one variables Hey old-timer, I assume you mean CHAR.INDEX, right? :-) I considered that approach too, but the subject line indicated it was a series of 0/1 variables, which I assumed would be numeric. But I have not worked with SurveyMonkey files enough to know whether that was a good assumption. ;-) David Marso wrote > Assuming the result is a string (or can be made a string) and there is > a single 1 in the string. > Simply use INDEX function to return the location of the 1. > Art Kendall wrote >> On another list someone asked about transforming dichotomous items >> back to Likert items. >> >> developerworks is down, but am I correct that >> there is an extension command to do this >> 10000 ==> 1 >> 01000 ==> 2 >> 00100 ==> 3 >> 00010 ==> 4 >> 00001 ==> 5 >> ? >> >> Also if someone has used >> survey monkey is there a way to ask it to >> return the data collapsed to Likert items? >> >> -- >> Art Kendall >> Social Research Consultants ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Survey-monkey-returned-Likert-items-as-5-zero-one-variables-tp5719471p5719477.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Administrator
|
In reply to this post by Bruce Weaver
How magically obtuse ;-)
Rube Goldberg loves you!. -- data list free / d1 to d5 (5f1). begin data 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 end data. VECTOR d=d1 to d5. loop likert=1 to 5. end loop if d(likert)=1. LIST. d1 d2 d3 d4 d5 likert 1 0 0 0 0 1.0000 0 1 0 0 0 2.0000 0 0 1 0 0 3.0000 0 0 0 1 0 4.0000 0 0 0 0 1 5.0000 Number of cases read: 5 Number of cases listed: 5
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
Yep. Compared to that, my suggestion was Rubish indeed. You can even throw another b into Rubish if you wish.
Nabble does not have a smiley image for hanging one's head in shame, so I'll have to make due with this one (blushing). p.s. - What was it Art K used as an excuse last week--NEC? :-)
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
In reply to this post by David Marso
What does surveymonkey return when you don't answer anything (five zeroes)? I would have thought if that occurred David's syntax would return either nothing or a 5, but it returns a 6! Which works out pretty well as long as you realize 6 isn't a valid value.
|
In reply to this post by David Marso
However I have been
trying to wrap that in an outer loop.
This works EXCEPT for likert3 !! new file. data list fixed /id (f2) q1.1 to q1.5 q2.1 to q2.5 q3.1 to q3.5 (15f1) target1 to target3 (3f1). begin data 01100000100000010124 02010000010000010234 03001000000100010354 04100001000010000111 05010000100001000222 06000100001000010333 07001000010000100444 08000010000100001555 end data. vector likert(3, f1). vector subset (5). vector dummy = q1.1 to q3.5. do repeat item = likert1 to likert3/ start_dum = 1 6 10. * inner loop. loop #j = 1 to 5. compute subset(#j) = dummy(start_dum+(#j-1)). end loop. loop val= 1 to 5. end loop if subset(val). compute item=val. end repeat. list variables =id target1 to target3 likert1 to likert3. Art Kendall Social Research ConsultantsOn 4/15/2013 10:06 AM, David Marso [via SPSSX Discussion] wrote: How magically obtuse ;-)
Art Kendall
Social Research Consultants |
Administrator
|
Too many moving parts ;-)
Insufficient lubrication? -- VECTOR q1=q1.1 to q1.5 / q2=q2.1 to q2.5 /q3=q3.1 to q3.5 . DO REPEAT vec=q1 q2 q3 /r=t1 t2 t3. LOOP r=1 to 5. end loop if vec(r)=1. END REPEAT. LIST. id q1.1 q1.2 q1.3 q1.4 q1.5 q2.1 q2.2 q2.3 q2.4 q2.5 q3.1 q3.2 q3.3 q3.4 q3.5 target1 target2 target3 t1 t2 t3 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 2 4 1.0000 2.0000 4.0000 2 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 2 3 4 2.0000 3.0000 4.0000 3 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 3 5 4 3.0000 5.0000 4.0000 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1.0000 1.0000 1.0000 5 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2 2 2 2.0000 2.0000 2.0000 6 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 3 3 3 4.0000 4.0000 4.0000 7 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 4 4 4 3.0000 3.0000 3.0000 8 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 5 5 5 5.0000 5.0000 5.0000 Number of cases read: 8 Number of cases listed: 8
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
I do not see what the
variable r does
on the do repeat.
first it is a stand-in variable for the do repeat. then it is the loop index then it ???? I can see that t1 to t3 match the target variables, so the syntax works new file. data list fixed /id (f2) q1.1 to q1.5 q2.1 to q2.5 q3.1 to q3.5 (15f1) target1 to target3 (3f1). begin data 01100000100000010124 02010000010000010234 03001000000100010354 04100001000010000111 05010000100001000222 06000100001000010333 07001000010000100444 08000010000100001555 end data. *Thanks to David Marso for this approach. *create as many q vectors as you have Likert items. VECTOR q1=q1.1 to q1.5 / q2=q2.1 to q2.5 / q3=q3.1 to q3.5 . * change the number of variables going into the list of stand-in variables * namely, "vec" and "r" to match the number of Likert items. DO REPEAT vec=q1 to q3 /r=t1 to t3. LOOP r=1 to 5. end loop if vec(r). END REPEAT. LIST. Art Kendall Social Research ConsultantsOn 4/15/2013 11:48 AM, David Marso [via SPSSX Discussion] wrote: Too many moving parts ;-)
Art Kendall
Social Research Consultants |
Administrator
|
Yeah, that code can mess with your mind !
Most people don't realize that you can use vectors as stand ins ;-) DO REPEAT ...... END REPEAT PRINT . 177 0 +LOOP t1=1 to 5 178 1 +end loop if q1(t1)=1 179 0 +LOOP t2=1 to 5 180 1 +end loop if q2(t2)=1 181 0 +LOOP t3=1 to 5 182 1 +end loop if q3(t3)=1
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
Surprisingly/Interestingly TO works here as well ;-)
-- VECTOR q1=q1.1 to q1.5 / q2=q2.1 to q2.5 /q3=q3.1 to q3.5 . DO REPEAT vec=q1 TO q3 /r=t1 TO t3. LOOP r=1 to 5. end loop if vec(r). END REPEAT PRINT.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |