2

I am working on a clinical research project using a large dataset of nationwide hospital discharges. We are using SPSS for statistical analysis.

The dataset contains 25 diagnoses variables (DX1-DX25) which capture up to 25 diagnoses per discharge. A patient could have multiple diagnoses, so DX1 would be the primary diagnosis, DX2 is the secondary, etc.

The DXn variables are string variables that contain ICD-9 codes. ICD-9 is a system of diagnostic codes for classifying diseases.

We would like to know the 10 most common diagnoses (ICD-9 codes) across all 25 diagnoses variables. Is there a way to run a frequency analysis across all 25 diagnoses variables in SPSS? In other words, I would like one frequency table that shows the combined frequency/occurrence of each ICD-9 code.

Thanks!

2 Answers 2

2

If you have access to the Custom Tables (CTABLES) procedure, you can define a multiple category set (Analyze > Tables > Multiple Response Sets and use the Custom Tables procedure to tabulate across all the variables in the set. This works whether the variables are string or numeric.

Sign up to request clarification or add additional context in comments.

Comments

1

You could restructure (to get all the diagnoses in one variable) and then use a simple frequency analysis:

varstocases /make DX from DX1 to DX25.
freq DX.

You should do this in a separate dataset and keep your original dataset structure. For example:

dataset name OrigData.
dataset copy ForRestr.
dataset activate ForRestr.
varstocases .....
freq ....
dataset activate OrigData.

2 Comments

If the DX variables are numeric with the associated value label, you can use mutliple response groups. Something like MULT RESPONSE GROUPS=$DX (DX1 TO DX25 (1,100)) \FREQUENCIES $DX. If they are strings, you can use MRSETS, but then you need to use CTABLES instead of FREQUENCIES.
@AndyW, why not post this as an answer? BTW according to the question "The DXn variables are string variables".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.