Creating Data Validation Rules

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating Data Validation Rules

Allison Meserve

Hi,

 

I have a dataset that has been created from individuals completing a survey online. Their answers are saved in SQL and then transferred into SPSS. The SQL database is prefilled with 555 if someone has not seen a question (not meaning that they were skipped out of it). Once they see the question or are skipped out of it the database fills in their answer or 888 if it was INAP. I have created a filter variable to include only those who have completed the survey. While running frequencies I still found many variables with 555 appearing. I have tried to create a single-variable validation rule which lists all the valid values, other than 555. When I ran a Data Validation using that rule however it was not listing the cases where a 555 appeared.  

 

Does anyone have a suggestion of how I can create syntax that lists the IDs of all those who have a 555 appearing in ANY variable?

 

Thanks,

Allison  

IMPORTANT NOTE
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender immediately and delete the message and any attachments from any computer.

Reply | Threaded
Open this post in threaded view
|

Re: Creating Data Validation Rules

Maguin, Eugene
Allison,

I'm assuming that all variables that might contain a '555' are
numerics--absolutely no string variables. One way is

count any555s=v1 to v783(555).
Temporary.
Select if (any555s gt 0).
List id any555s.

Gene Maguin


>>I have a dataset that has been created from individuals completing a
survey online. Their answers are saved in SQL and then transferred into
SPSS. The SQL database is prefilled with 555 if someone has not seen a
question (not meaning that they were skipped out of it). Once they see the
question or are skipped out of it the database fills in their answer or 888
if it was INAP. I have created a filter variable to include only those who
have completed the survey. While running frequencies I still found many
variables with 555 appearing. I have tried to create a single-variable
validation rule which lists all the valid values, other than 555. When I ran
a Data Validation using that rule however it was not listing the cases where
a 555 appeared.

Does anyone have a suggestion of how I can create syntax that lists the IDs
of all those who have a 555 appearing in ANY variable?

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Creating Data Validation Rules

William Dudley WNDUDLEY
In reply to this post by Allison Meserve

you can use the count command

Count FLAG555 = varlist  (555).
where valist is your list of varibles.
in this case I assume that you would include all variables in the dataset.
the commnad records for each case the number of variables which have a value of 555.

You want those cases with FLAG555 = 0.
so you could simple
SELECT IF FLAG555 = 0.



William N. Dudley, PhD
Associate Dean for Research
The School of Health and Human Performance Office of Research
The University of North Carolina at Greensboro
126 HHP Building, PO Box 26170
Greensboro, NC 27402-6170
VOICE 336.2562475
FAX 336.334.3238



Allison Meserve <[hidden email]>
Sent by: "SPSSX(r) Discussion" <[hidden email]>

04/03/2009 05:15 PM

Please respond to
Allison Meserve <[hidden email]>

To
[hidden email]
cc
Subject
Creating Data Validation Rules





Hi,
 
I have a dataset that has been created from individuals completing a survey online. Their answers are saved in SQL and then transferred into SPSS. The SQL database is prefilled with 555 if someone has not seen a question (not meaning that they were skipped out of it). Once they see the question or are skipped out of it the database fills in their answer or 888 if it was INAP. I have created a filter variable to include only those who have completed the survey. While running frequencies I still found many variables with 555 appearing. I have tried to create a single-variable validation rule which lists all the valid values, other than 555. When I ran a Data Validation using that rule however it was not listing the cases where a 555 appeared.  
 
Does anyone have a suggestion of how I can create syntax that lists the IDs of all those who have a 555 appearing in ANY variable?
 
Thanks,
Allison  

IMPORTANT NOTE
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender immediately and delete the message and any attachments from any computer.