Page 1 of 1

Recode Variables with Text File Condition/Value List

Posted: Thu Oct 12, 2017 11:45 pm
by rdone
I need to recode about 14K possible values into a couple hundred values using a text file of conditions (ICD codes into CCS groupers, in case someone knows of existing SPSS code to do this). My idea is to use a macro and/or loop function, but I haven't found any code out there that references a text file of recoding conditions/values. Apologies in advance if this common knowledge, but can someone point me in the right direction? Thanks.

Re: Recode Variables with Text File Condition/Value List

Posted: Fri Oct 13, 2017 12:13 am
by statman
Need more info and ............

Re: Recode Variables with Text File Condition/Value List

Posted: Fri Oct 13, 2017 12:36 am
by rdone
Win7 Ultimate 64, SPSS 22 64.
The code needs to look at the value of a single variable for every case in my data set, compare it to all of the values in column a of $dxref 2015.csv, and assign the corresponding recode value in column b. At https://www.hcup-us.ahrq.gov/toolssoftware/ccs/ccs.jsp#download you can download the zip file for Single Level CCS, unzip, open the file $dxref 2015.csv and see columns a and b.
So can you point me to a solution for referencing the csv file for recoding?