I have an SPSS dataset with 5 variables:
Q1_r1 Q1_r2 Q1_r3 Q1_r4 Q1_r5 These 5 variables have values ranging from 1 to 5(Where 1 means Strongly disagree and 5 means Strongly Agree). I want to identify straight liners like those cases for which there is 1 or 2 or 3 or 4 or 5 in all 5 variables. How would I do that? |
I guess you should check the "count" synthax command
cheers |
In reply to this post by Niks
Will this work?
COMPUTE StraightLiner=(SD(Q1_r1 TO Q1_r5) EQ 0) . VALUE LABELS StraightLiner 0 'No' 1 'Yes' . EXECUTE .HTH, PR |
In reply to this post by Niks
You would check if the standard deviation across the variables of interest equals zero i.e. compute CheckQ1SD=sd(Q1_r1 to Q1_r5). You may want to check for any missings before hand also. You could also define "straight liners" below a certain standard deviation criteria also, if not simply zero. On 22 April 2015 at 10:26, Niks <[hidden email]> wrote: I have an SPSS dataset with 5 variables: |
Administrator
|
In reply to this post by Niks
As Jignesh mentioned, it's not clear what you want to do with missing data. If you want to include only cases with complete data for all 5 variables, change SD to SD.5 in PRogman's solution.
COMPUTE StraightLiner=(SD.5(Q1_r1 TO Q1_r5) EQ 0) . VALUE LABELS StraightLiner 0 'No' 1 'Yes' . EXECUTE . From the FM: "The .n suffix can be used with all statistical functions to specify the number of valid arguments. For example, MEAN.2(A,B,C,D) returns the mean of the valid values for variables A, B, C, and D only if at least two of the variables have valid values. The default for n is 2 for SD, VARIANCE, and CFVAR and 1 for other statistical functions. If the number specified exceeds the number of arguments in the function, the result is system-missing."
--
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 Niks
Sounds like a class assignment: First line only: do it yourself! File >> new >> syntax Count ones = Q1_r1 to Q1_r5 (1) /twos = ~~ /fives = freq ones to fives. The ones you want are the values 5 in all five vars. A nice check would be with MULT RESPONSE John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop -----Original Message----- I have an SPSS dataset with 5 variables: Q1_r1 Q1_r2 Q1_r3 Q1_r4 Q1_r5 These 5 variables have values ranging from 1 to 5(Where 1 means Strongly disagree and 5 means Strongly Agree). I want to identify straight liners like those cases for which there is 1 or 2 or 3 or 4 or 5 in all 5 variables. How would I do that? -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/How-to-identify-straight-liners-tp5729311.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 |
In reply to this post by Jignesh Sutar
This works
|
Free forum by Nabble | Edit this page |