|
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 |
|
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 |
|
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
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
|
| Free forum by Nabble | Edit this page |
