SPSS Frequency Plot Complication

97 views Asked by At

I am having a hard time generating precisely the frequency table I am looking for using SPSS.

The data in question: cases (n = ~800) with categorical variables DX_n (n = 1-15), each containing ICD9 codes, many of which are the same code. I would like to create a frequency table that groups the DX_n variables such that I can view frequency of every diagnosis in this sample of cases.

The next step is to test the hypothesis that the clustering of diagnoses in this sample is different than that of another. If you have any advice as to how to test this, that would be really appreciated as well!

Thanks!

Edit: My attempts: 1) Analyze -> Descriptive Statistics -> Frequencies; then add variables DX_n (1-15) and display frequency charts. The output is frequencies of each ICD9 code per DX_n variable (so 15 tables are generated - I'm hoping to just have one grouped table).

2) I tried adjusting the output format to organize by variable and also to compare variables but neither option gives the output I'm looking for.

2

There are 2 answers

0
JKP On BEST ANSWER

I think what you are looking for CTABLES. It can do parallel columns of frequencies, and it includes a column proportions test that can see whether the distributions differ

0
gch On

Thank you, JKP! You set me on exactly the right track. I'm not sure how I overlooked that menu. Just to clarify in case anyone else comes along needing to figure this out:

  1. Group diagnosis variables into a multiple response set using Analyze > Custom Tables > Multiple Response Sets. Code the variables as categories.

http:// i.imgur.com/ipE9suf.png

  1. Create a custom table with your new multiple response set as a row and the subsets to compare as columns. I set summary statistics to compute from rows and added the column n% column (sorted descending).

http:// i.imgur.com/hptIkfh.png

  1. Under test statistics, include a column proportions z-test as JKP suggested.

http:// i.imgur.com/LYI6ZRl.png

  1. Behold, your results:

http:// i.imgur.com/LgkBA8X.png

Thanks again, and best of luck to anyone else who runs across this. -GCH

p.s. Sorry everyone, I was going to post images but don't have enough reputation points yet. Images detailing the steps in the GUI can be found at the obfuscated links above.