cmbd: Comorbidity measures from AHRQ HCUP

Description Usage Arguments Value Author(s) References Examples

View source: R/cmbd.R

Description

This function maps a matrix of ICD9 codes to AHRQ comorbidity measures.

Usage

1
cmbd(icd, drg = NULL, needClean = TRUE, needPrep = TRUE)

Arguments

icd

a character matrix of icd9 codes, with rows representing patients.

drg

a numeric vector of drg codes, with length the same as nrow(icd).

needClean

logical, TRUE means cleaning is needed (string trimming, zero supplementation)

needPrep

logical, TRUE means preparation is needed (convert char to numeric)

Value

a matrix with the same number of rows as the input and with the comorbidity measures in columns

Author(s)

Jun Yan

References

Elixhauser et. al. (1998)

Examples

1
2
3
4
data(dxDat)
drg <- dxDat$drg
icd <- dxDat[, -1L]
output <- cmbd(icd, drg=drg)

wenjie2wang/touch documentation built on Oct. 17, 2018, 3:31 a.m.