I was checking numbers after finding duplicate cases from both 2015 and 2016 in my cumulative file for British Social Attitudes. The file is OK now, but can anyone explain what happened here? use all. temp. select if ((caseid ge 99959) and (caseid le 104286)). freq rsex.
use all. temp. select if ((caseid lt 99959) and (caseid gt 104286)). freq rsex.
John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) Research: Subjective Social Indicators (Quality of Life) |
Chris I know, but the commands work if used in reverse order. The first command specifies all cases inside a range, the second, all cases outside. USE ALL should restore all cases, no? New file has 102900 cases and 11588 variables and will be uploaded to UKDS and Natcen once I've sorted the glitches in incorrect measurement levels and some leftover variable labelling from early waves. John John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) From: Chris Stride <[hidden email]> You used and rather than or! From: [hidden email] I was checking numbers after finding duplicate cases from both 2015 and 2016 in my cumulative file for British Social Attitudes. The file is OK now, but can anyone explain what happened here? use all. temp. select if ((caseid ge 99959) and (caseid le 104286)). freq rsex.
use all. temp. select if ((caseid lt 99959) and (caseid gt 104286)). freq rsex.
John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) Research: Subjective Social Indicators (Quality of Life) ===================== 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 John F Hall
Of course the last selection will result in null set. Put down the beer my friend.
===================== 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 |
OK, I surrender. Too early for beer, but village fête on today. Just sorting dozens of variables with incorrect measurement levels caused by either SPSS heuristics or automatic archiving software at UKDS.
John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) Research: Subjective Social Indicators (Quality of Life) -----Original Message----- From: SPSSX(r) Discussion <[hidden email]> On Behalf Of David Marso Sent: 22 July 2018 10:21 To: [hidden email] Subject: Re: No cases after temporary select if Of course the last selection will result in null set. Put down the beer my friend. ===================== 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
|
As Chris Stride mentioned, you needed OR rather than AND.
~(A & B) IFF ~A V ~B. Philosophy 101. John F Hall wrote > OK, I surrender. Too early for beer, but village fête on today. Just > sorting dozens of variables with incorrect measurement levels caused by > either SPSS heuristics or automatic archiving software at UKDS. > > John F Hall MA (Cantab) Dip Ed (Dunelm) > [Retired academic survey researcher] > > Email: > johnfhall@ > > Website: Journeys in Survey Research > Course: Survey Analysis Workshop (SPSS) > Research: Subjective Social Indicators (Quality of Life) > > -----Original Message----- > From: SPSSX(r) Discussion < > SPSSX-L@.UGA > > On Behalf Of David Marso > Sent: 22 July 2018 10:21 > To: > SPSSX-L@.UGA > Subject: Re: No cases after temporary select if > > Of course the last selection will result in null set. Put down the beer my > friend. > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@.UGA > (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 > LISTSERV@.UGA > (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 ----- 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?" -- Sent from: http://spssx-discussion.1045642.n5.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
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?" |
In reply to this post by David Marso-2
Once I'd got rid of the duplicate cases, there was a further problem of serial numbers: 27000001 ff for 2015 2800001 ff for 2016 which put the years out of sequence when sorting, so caseid was recalculated after the sort. do if (year eq 2016) . compute newsserial = sserial-2520000. else if (year eq 2015) . compute newsserial = sserial-24300000. else if (year ge 1983 and year le 2014). compute newsserial = sserial. end if. sort cases by year (d) caseid (a). compute caseid = $casenum. freq rsex.
The moules/frîtes at the fête were excellent, as was the beer. John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) Research: Subjective Social Indicators (Quality of Life) -----Original Message----- OK, I surrender. Too early for beer, but village fête on today. Just sorting dozens of variables with incorrect measurement levels caused by either SPSS heuristics or automatic archiving software at UKDS. John F Hall MA (Cantab) Dip Ed (Dunelm) [Retired academic survey researcher] Email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) Research: Subjective Social Indicators (Quality of Life) -----Original Message----- From: SPSSX(r) Discussion <[hidden email]> On Behalf Of David Marso Sent: 22 July 2018 10:21 To: [hidden email] Subject: Re: No cases after temporary select if Of course the last selection will result in null set. Put down the beer my friend. ===================== 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 |
Free forum by Nabble | Edit this page |