[R] Medical risk package calculation RSI

David Winsemius dwinsemius at comcast.net
Sun Mar 25 18:37:03 CEST 2018


> On Mar 25, 2018, at 7:53 AM, Ramesh YAPALPARVI <ramesh.yapalparvi at icloud.com> wrote:
> 
> 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?

That is just the code and error-free output from the help page for `icd9cm_sessler_rsi`.

Your posting does not actually conform to the rhelp mailing list standards since there is no illustrated problem with the use of the R language and rhelp is not designed to fill in gaps in your understanding of health services research methods. Have you read through and more importantly "worked through" the two vignettes that ship with that package? The readers of this list might be more motivated if you had presented evidence that you had made a good faith effort with the material that had been already made available to you.

vignette(pac='medicalrisk')

Vignettes in package ‘medicalrisk’:

medicalrisk              medicalrisk: Calculating risk and comorbidities
                         from ICD-9-CM codes (source, html)
advanced                 medicalrisk: Correlating ICU days with mortality
                         risk and comorbidities (source, html)

Once you have made an effort to "do your own homework", you might be in a position to construct a more substantial and more specific question for a venue where this might be more on-topic, perhaps CrossValidated.com <https://stats.stackexchange.com/>
-- 

David Winsemius
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law



More information about the R-help mailing list