# Correlation between diagnosis codes

How do I run a correlation analysis on medical diagnosis (Dx) codes between two years at patient level. Data runs into 45000+ observations for each patient with different diseases across years and I am trying to establish a correlation using some non parametric approach.

My data would look like:

patient  2013    2014

1       25000   25080
1       49121   49122
1       44490   44490


likewise for another 1000 patients. The codes given are Dx based on the ICD 9 CMS guidelines.

• Are you interested in whether the Dx for 2013 is independent of the Dx for 2014, or if the two years agree? Do you want a measure of association / agreement, or do you need a test, or both? Feb 23, 2015 at 5:16
• Dx in 2014 is dependent on Dx in 2013 because the Dx codes are chronic in nature (meaning once they are found in a person, it will persist forever), based on the medical records i have, i need to see whether the doctor diagnosed the patient with the Dx that he had last year as well. i am not looking at any tests for now, i looked at Kappa but for some reasons the results i get are not stronger though i have Dx codes present in both years. hope this clarifies Feb 23, 2015 at 5:24