SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Can you recode from excel or other file?

    Posted Fri May 13, 2022 07:02 PM
    Okay, another newbie question...

    I have a dataset that includes hundreds of thousands of police stops.  For each, if the stop was based on a possible violation of the law, the code section violated had to be included in the stop data ("Suspicion_offense_CD").  I have a list of all of the hundreds, if not thousands, of possible codes.  I would like to recode the code section violated into a new variable that just indicates whether the violation was an "infraction" "misdemeanor" or "felony," and I already have an excel spreadsheet that includes each code and denotes whether it is infraction, misdemeanor or felony.  Is there a way to recode into a new variable without entering each of those values?  What is the quickest/easiest way to recode these into new variables? (Ideally 0/1/2/3 for "none/infraction/misdemeanor/felony")

    Thank you

    ------------------------------
    Melanie Ochoa
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Can you recode from excel or other file?

    Posted Fri May 13, 2022 07:26 PM
    This can be done by reading in the violation codes and then using that as a lookup table.  I can help with that, but I would need a sample of the data and the codes file.  If you can send me that (jkpeck@gmail.com), I'll take a look.

    --