Hello!
I am somewhat new to SPSS, but I am trying to find a solution to deal with a data set where the folks who compiled the data combined entries that were in multiple fields and I need to pull them back apart. So, the data relates to police stops and the original data set included 0/1 in various fields for possible actions taken. Each of the original fields were items like "pointed firearm" "used baton" "handcuffed", etc. So there are lots of combinations of those possible outcomes within the data. I don't know what program or process they used, but the data is now all in a single field--although there are 2 different fields they recoded this data into: one has the numeric value of the data however they coded (e.g. pointed firearm=8, baton=11, handcuffed=3, asked consent to search=17, etc.), but how it looks varies. Here are some examples of how the data might show up:
- 5,NA,"17,Y","18,NA","19,Y","20,NA"
- 24,NA
- 1,NA,"17,N"
- 1,NA,"5,NA","6,NA","18,NA"
As you can see, some have quotes, some don't. They vary in length. While the actions are all the numbers, some entries also include the outcome of the action (NA/Y/N) and others do not have a separate outcome (e.g. if one of the actions was "searched" it might have a Y or N as an outcome to indicate whether any contraband was found). The presence or absence of quotes also complicates things, AND it appears even for some numbers there are quotes for some and not others (e.g. both 5,NA and "5,NA" in the list above).
There is also a labeled version of the same actions, which lists the actual actions taken. Here are some examples of how the data looks:
- Person removed from vehicle by order,"Handcuffed or flex cuffed","Patrol car detention","Search of person was conducted"
- Curbside detention,"Handcuffed or flex cuffed","Patrol car detention","Asked for consent to search person, Yes","Search of person was conducted","Asked for consent to search property, Yes","Search of property was conducted"
- Patrol car detention,"Search of person was conducted","Property was seized"
Same issues as the above. And while the text seems to be consistent, again there is the issue of sometimes including quotes and sometimes not (e.g. Patrol car detention and "Patrol car detention").
I have no idea how to pull apart this data to get these options back into their individual fields. At minimum, I would at least like to be able to create a variable where cases that included actions taken #8-14 (which are all types of uses of force) would be coded 1 and 0 for all else. I attempted a few different things, but nothing was successful (I can't even recall the various procedures I tried at the moment, but I know that one recurrent issue is that it would pull records where there was a double-digit number that included any of the digits I was looking for (i.e. I wanted to pull cases where there was an 8, but it would also pull cases where there was an 18).
If folks can think of any solution to this, it would be MUCH appreciated. This data is a mess, and I am trying to do the best I can with it as I am simultaneously trying to learn how to (re-)learn how to use this program!
------------------------------
Melanie Ochoa
------------------------------
#SPSSStatistics