This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Create multimorbidity at baseline, including both ICD code diagnosis and self-reported conditions.
table(df$mm_base)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18
255992 148304 58214 22351 9397 4336 1874 963 480 249 94 62 28 16 5 3 1
There are descrepancies between self-reported and inpatient hospital diagnosis `
table(df$v2, df$cad_report)
No Yes
0 476218 10292
1 3215 12644
table(df$v9, df$hp_report)
No Yes
0 382027 119791
1 204 347
table(df$v10, df$diabetes_diag_tidy)
Missing No Not report Yes
0 887 473879 1652 18142
1 45 550 32 7182
table(df$v14, df$copd_report)
No Yes
0 493380 7002
1 1191 796
table(df$v15, df$asthma_report)
No Yes
0 446153 44434
1 2930 8852
table(df$v23, df$cancer_base)
0 1
0 461289 25743
1 0 15337