[R] Medical risk package calculation RSI

Ramesh YAPALPARVI ramesh.yapalparvi at icloud.com
Sun Mar 25 16:53:19 CEST 2018


Hi all,



I'm using the medical risk package to determine the risk stratification Index based on the ICD9 codes. Although, I have been successful in using it, I'm unable to interpret the output.



here is the sample code



# Calculate RSI for each patient ("id") in dataframe


cases <- data.frame(id=c(1,1,1,2,2,2,2,2),
+                     icd9cm=c("D4019","D25000","DV707","D71945","DV4365","D78079","D70909","D1958"))


library(plyr)
ddply(cases, .(id), function(x) { icd9cm_sessler_rsi(x$icd9cm) } )




Output:

id rsi_1yrpod rsi_30dlos rsi_30dpod rsi_inhosp
1  1 -0.2860474  1.2481208 -0.5722244 -0.2612804
2  2  0.1417417  0.9779779 -1.0318395  0.0000000

Could anyone please help me?

Thanks,
Ramesh


More information about the R-help mailing list