Hi Team, I am an SPSS 18 user and I want to do the data validation in SPSS. For e.g.: 1.
In question Q1 we have data either 1 or 2, so if any respondent is saying anything except 1 or 2 then SPSS will throw an error. 2.
In question Q2. If any one is saying 1 in Q1 then data should be 1-5 in Q2 except it will be blank. In case of failure of this condition with any respondent SPSS will show me an error. Please let me know syntaxes for this kind of data validation in SPSS.
Regards, Bhupendra |
Bhupendra Each case should have a unique ID, so if you haven’t got one you can create one by: compute serial = $seqnum . Try a simple data check first: Freq q1 q2 . Cros q1 by q2 . FREQ will give you a count for each value of each variable; CROS will show combinations. From these you can check for ranges and for non-permissible combinations. If your variables are numeric and you left your blanks intact, they will be treated as system missing and will be left out of the tables. If you have values other than 1 or 2 in Q1, they should be checked against original questionnaires. You can do this by manually scrolling down the data editor in data view and taking the row number of the case(s). After this you’ll need to use RECODE and MISSING VALUES, eg: Recode q1 (0,3 thru hi = 9) /q2 (0,6 thru hi = 9) . Missing values q1 q2 (9) . If you haven’t already done so you should also label your variables and your values. My website has 400+ pages of syntax-based tutorials, specially written for beginners, on the use of SPSS to manage and analyse data from questionnaires. (See: http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html ) John F Hall From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bhupendra Tyagi Hi Team, I am an SPSS 18 user and I want to do the data validation in SPSS. For e.g.: 1. In question Q1 we have data either 1 or 2, so if any respondent is saying anything except 1 or 2 then SPSS will throw an error. 2. In question Q2. If any one is saying 1 in Q1 then data should be 1-5 in Q2 except it will be blank. In case of failure of this condition with any respondent SPSS will show me an error. Please let me know syntaxes for this kind of data validation in SPSS. Regards, Bhupendra |
Administrator
|
John, I did a double-take on that $seqnum. Did you mean $casenum? ;-)
Cheers, Bruce
--
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 Bhupendra Tyagi
Bhupendra,
I'm not at all sure that this is what you really want. But,
...
1) recode q1(1 2=0)(else=1) into err1.
2) Your statement is mangled and i can't decode it. So
this is most likely wrong.
if (q1 eq 1 and (q2 lt 1 or q2 gt 5)
err2=1.
Gene Maguin
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bhupendra Tyagi Sent: Tuesday, August 16, 2011 7:48 PM To: [hidden email] Subject: Need help for Data Validation in SPSS 18 Hi Team, I am an SPSS 18 user and I want to do the data validation in
SPSS. For e.g.: 1.
In question Q1 we have data either 1 or 2, so if any
respondent is saying anything except 1 or 2 then SPSS will throw an
error. 2.
In question Q2. If any one is saying 1 in Q1 then data
should be 1-5 in Q2 except it will be blank. In case of failure of this
condition with any respondent SPSS will show me an error. Please let me know syntaxes for this kind of data validation
in SPSS. Regards, Bhupendra |
In reply to this post by Bruce Weaver
Bruce
My mistake: should have checked first. John -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: 17 August 2011 13:32 To: [hidden email] Subject: Re: Need help for Data Validation in SPSS 18 John, I did a double-take on that $seqnum. Did you mean $casenum? ;-) Cheers, Bruce John F Hall wrote: > > Bhupendra > > > > Each case should have a unique ID, so if you haven't got one you can > create > one by: > > > > compute serial = $seqnum . > > > > Try a simple data check first: > > > > Freq q1 q2 . > > Cros q1 by q2 . > > > > FREQ will give you a count for each value of each variable; CROS will show > combinations. From these you can check for ranges and for non-permissible > combinations. If your variables are numeric and you left your blanks > intact, they will be treated as system missing and will be left out of the > tables. If you have values other than 1 or 2 in Q1, they should be > checked > against original questionnaires. You can do this by manually scrolling > down > the data editor in data view and taking the row number of the case(s). > > > > After this you'll need to use RECODE and MISSING VALUES, eg: > > > > Recode q1 (0,3 thru hi = 9) /q2 (0,6 thru hi = 9) . > > Missing values q1 q2 (9) . > > > > If you haven't already done so you should also label your variables and > your > values. > > > > My website has 400+ pages of syntax-based tutorials, specially written for > beginners, on the use of SPSS to manage and analyse data from > questionnaires. (See: > http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html ) > > > > > > John F Hall > > > > [hidden email] > > www.surveyresearch.weebly.com <http://surveyresearch.weebly.com/> > > > > > > > > > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Bhupendra Tyagi > Sent: 17 August 2011 01:48 > To: [hidden email] > Subject: Need help for Data Validation in SPSS 18 > > > > Hi Team, > > > > I am an SPSS 18 user and I want to do the data validation in SPSS. For > e.g.: > > 1. In question Q1 we have data either 1 or 2, so if any respondent is > saying anything except 1 or 2 then SPSS will throw an error. > > 2. In question Q2. If any one is saying 1 in Q1 then data should be > 1-5 > in Q2 except it will be blank. In case of failure of this condition with > any > respondent SPSS will show me an error. > > > > Please let me know syntaxes for this kind of data validation in SPSS. > > > > Regards, > > Bhupendra > ----- -- 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/Need-help-for-Data-Validation- in-SPSS-18-tp4706363p4707786.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 |
Hi John/Bruce,
Thank you for your help on this. I will try your way an let you know in case of any clarifications. John: Again thank you for the link. Regards, Bhupendra -----Original Message----- From: John F Hall [mailto:[hidden email]] Sent: Wednesday, August 17, 2011 09:50 To: 'Bruce Weaver'; [hidden email] Cc: Bhupendra Tyagi Subject: RE: Need help for Data Validation in SPSS 18 Bruce My mistake: should have checked first. John -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver Sent: 17 August 2011 13:32 To: [hidden email] Subject: Re: Need help for Data Validation in SPSS 18 John, I did a double-take on that $seqnum. Did you mean $casenum? ;-) Cheers, Bruce John F Hall wrote: > > Bhupendra > > > > Each case should have a unique ID, so if you haven't got one you can > create > one by: > > > > compute serial = $seqnum . > > > > Try a simple data check first: > > > > Freq q1 q2 . > > Cros q1 by q2 . > > > > FREQ will give you a count for each value of each variable; CROS will show > combinations. From these you can check for ranges and for non-permissible > combinations. If your variables are numeric and you left your blanks > intact, they will be treated as system missing and will be left out of the > tables. If you have values other than 1 or 2 in Q1, they should be > checked > against original questionnaires. You can do this by manually scrolling > down > the data editor in data view and taking the row number of the case(s). > > > > After this you'll need to use RECODE and MISSING VALUES, eg: > > > > Recode q1 (0,3 thru hi = 9) /q2 (0,6 thru hi = 9) . > > Missing values q1 q2 (9) . > > > > If you haven't already done so you should also label your variables and > your > values. > > > > My website has 400+ pages of syntax-based tutorials, specially written for > beginners, on the use of SPSS to manage and analyse data from > questionnaires. (See: > http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html ) > > > > > > John F Hall > > > > [hidden email] > > www.surveyresearch.weebly.com <http://surveyresearch.weebly.com/> > > > > > > > > > > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of > Bhupendra Tyagi > Sent: 17 August 2011 01:48 > To: [hidden email] > Subject: Need help for Data Validation in SPSS 18 > > > > Hi Team, > > > > I am an SPSS 18 user and I want to do the data validation in SPSS. For > e.g.: > > 1. In question Q1 we have data either 1 or 2, so if any respondent is > saying anything except 1 or 2 then SPSS will throw an error. > > 2. In question Q2. If any one is saying 1 in Q1 then data should be > 1-5 > in Q2 except it will be blank. In case of failure of this condition with > any > respondent SPSS will show me an error. > > > > Please let me know syntaxes for this kind of data validation in SPSS. > > > > Regards, > > Bhupendra > ----- -- 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/Need-help-for-Data-Validation- in-SPSS-18-tp4706363p4707786.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 |
Free forum by Nabble | Edit this page |