I'm looking for a simple solution to what seems like a simple problem.
I have a data set that looks like this: The data comes from a form that is filled out by a medical provider. For each service provided to a patient the provider must check a box on the form that corresponds to a code. Thus, there are multiple values selected in each patient encounter. These multiple values come out of our system in a number of columns as seen above. I want to create a logical test in SPSS that does the following: If the value in S1, S2, S3, S4, S5, S6, or S7 is equal to 2, 4, 5, 6, 9, 10, 15, or 47 then another variable called STD_Check should be set to 1. If this test is false, then STD_Check should be set to 0. I think the easiest way to do it would be to make an if statement for each individual column to check for each individual value, but it seems like that is a silly way of approaching this problem. If anyone could help me with a shortcut to deal with this problem, I would very much appreciate it! Best, Aalap Bommaraju Cincinnati Health Department |
Can we simplify this ?
COUNT Std_Check = s1 to s7 (2,4,5,6,9,10,15,47). RECODE Std_Check (1 THRU HI = 1 ). ... Mark Miller On Sun, Oct 14, 2012 at 7:00 PM, abommaraju <[hidden email]> wrote: I'm looking for a simple solution to what seems like a simple problem. |
Free forum by Nabble | Edit this page |