Type: | Package |
Title: | Trauma Mortality Prediction Model |
Version: | 1.0.3 |
Date: | 2015-09-06 |
Author: | Cody Moore |
Maintainer: | Cody Moore <Jumper9400@gmail.com> |
Description: | Trauma Mortality prediction for ICD-9, ICD-10, and AIS lexicons in long or wide format based on Dr. Alan Cook's tmpm mortality model. |
Depends: | reshape2, stats |
License: | GPL-2 |
LazyData: | TRUE |
NeedsCompilation: | no |
Packaged: | 2016-02-28 19:48:20 UTC; Draguru |
Repository: | CRAN |
Date/Publication: | 2016-02-29 11:17:35 |
marcTable, default Lexicon for tmpm 1.0.3
Description
A data.frame
containing the master lexicon for the tmpm package.
Contains the index of ais, ICD-9, and ICD-10 trauma codes as well as
their respective marc weights within the tmpm model separated by body region.
Usage
marcTable
Format
A data frame with 10767 observations on the following 4 variables.
lexi
-
The trauma code lexicon, a factor with levels
ais
icdIX
icdX
. index
-
A unique index value for each entry, a factor with 10767 levels.
marc
-
Marc weights used in the tmpm model. A numeric vector
bodyregion
Body region where the injury occured. A factor with levels
1
2
3
4
5
6
7
8
9
A
C
E
F
H
S
References
Glance, LG, Osler, TM, Mukamel, DB, et al. TMPM-ICD9 A Trauma Mortality Prediction Model Based on ICD-9-CM Codes. Ann Surg 2009; 249:1032-1039.
Osler, T, Glance, L, Buzas, JS, et al. A Trauma Mortality Prediction Model Based on the Anatomic Injury Scale. Ann surg 2008; 247:1041-1048.
Examples
# lexi index marc bodyregion
#1 ais 110099 -0.06503967 1
#2 ais 110202 0.13577652 1
#3 ais 110402 0.06703821 1
#4 ais 110600 0.12536530 1
#5 ais 110602 -0.01852628 1
#6 ais 110604 0.27072704 1
Trauma Mortality Prediction Model
Description
An R port for the tmpm trauma mortality prediction model using the ICD-9, ICD-10,
or AIS lexicon in long or wide format. Based upon the tmpm
package
created by Alan Cook, MD for STATA
Usage
tmpm(Pdat,ILex = 1,ICs = marcTable,Long = FALSE)
Arguments
Pdat |
An |
ILex |
An |
ICs |
An |
Long |
A |
Value
The tmpm algorithm will return a data.frame
that contains the
original dataset in wide format with an added last column containing
the calcualted probability of death for each patient.
Note
Uses the Trauma Mortality prediction model created by Turner Osler, MD, MSc and Laurent Glance, MD.
Based upon the tmpm package written in STATA by Alan Cook, MD
Author(s)
Cody Moore
Alan Cook, MD
References
Glance, LG, Osler, TM, Mukamel, DB, et al. TMPM-ICD9 A Trauma Mortality Prediction Model Based on ICD-9-CM Codes. Ann Surg 2009; 249:1032-1039.
Osler, T, Glance, L, Buzas, JS, et al. A Trauma Mortality Prediction Model Based on the Anatomic Injury Scale. Ann surg 2008; 247:1041-1048.
Examples
## To evaluate ICD-9 patient data in wide format
#inc_key dx1 dx2 dx3 dx4
#1 10000007 821.11 822 815.03 823.00
#2 10011410 881.00 891 822.10 813.42
a <- data.frame(matrix(c(10000007,821.11,822,815.03,823,
10011410,881,891,822.1,813.42),nrow = 2,byrow = TRUE))
names(a) <- c("inc_key","dx1","dx2","dx3","dx4")
b <- tmpm(a,9)
## If the dataset is in long format
#inc_key variable value
#1 10000007 dx1 821.11
#2 10011410 dx1 881.00
#3 10000007 dx2 822.00
#4 10011410 dx2 891.00
#5 10000007 dx3 815.03
#6 10011410 dx3 822.10
#7 10000007 dx4 823.00
#8 10011410 dx4 813.42
c <- melt(a,id = "inc_key")
d <- tmpm(c,9,Long = TRUE)