The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
‘amscorer’ package provides functions for calculating various clinical scores used in healthcare. These scores assist in assessing patient risks, predicting outcomes, and making informed clinical decisions. The key clinical scores included in this package are:
Charlson Comorbidity Index (CCI): Predicts ten-year mortality risk based on comorbid conditions.
EPICES Score: Measures social deprivation.
MELD Score: Evaluates the severity of chronic liver disease.
Alternative Fistula Risk Score (a-FRS): Assesses the risk of postoperative pancreatic fistula.
Distal Pancreatectomy Fistula Risk Score (D-FRS): Estimates the risk of fistula after distal pancreatectomy.
The CCI predicts ten-year mortality risk based on the presence of comorbid conditions.
# Example data for CCI
set.seed(123)
n <- 10
my_data <- data.frame(
age = sample(30:90, n, replace = TRUE), # age
mi = sample(0:1, n, replace = TRUE), # Myocardial infraction
chf = sample(0:1, n, replace = TRUE), # Congestive heart failure
pvd = sample(0:1, n, replace = TRUE), # preripheral vascular disease
cevd = sample(0:1, n, replace = TRUE), # Cerebrovascular accident or Transient ischemic attack
dementia = sample(0:1, n, replace = TRUE), # Dematia
cpd = sample(0:1, n, replace = TRUE),# Chronic obstructive pulmonary disease
ctd = sample(0:1, n, replace = TRUE),# Connective tissue disease
pud = c(sample(0:1, (n-1), replace = TRUE) , NA), # peptide ulcer disease
liver_disease = sample(0:2, n, replace = TRUE), #Liver disease(None,Mild,Moderate to severe)
diabetes_mellitus = sample(0:2, n, replace = TRUE),#Diabetes(None,uncomplicated,End-organ)
hp = sample(0:1, n, replace = TRUE), # Hemipledia
ckd = sample(0:1, n, replace = TRUE), #Moderate to severe Chronic kidney disease
solid_tumor = sample(0:2, n, replace = TRUE), #Solid tumor(None,Localized,Metastatic)
leuk = sample(0:1, n, replace = TRUE), # Leukemia
lym = c(sample(0:1, (n-2), replace = TRUE) , c(NA , NA)), # Lymphoma
aids = sample(0:1, n, replace = TRUE) # AIDS
)
amscorer::cci(my_data ,replace_na_with_zero = FALSE)
#> age mi chf pvd cevd dementia cpd ctd pud liver_disease diabetes_mellitus hp
#> 1 60 1 0 0 0 1 0 1 1 0 0 1
#> 2 44 1 1 1 1 0 1 0 1 1 1 1
#> 3 80 1 0 0 1 0 1 0 0 1 0 1
#> 4 43 0 0 1 0 0 0 0 1 0 1 0
#> 5 32 1 0 1 0 0 0 0 1 1 0 1
#> 6 71 0 0 0 0 1 1 1 1 0 2 0
#> 7 79 1 1 0 0 1 0 1 0 0 2 1
#> 8 83 0 1 0 1 0 0 0 0 1 1 0
#> 9 72 0 0 0 0 1 0 1 1 2 2 0
#> 10 66 0 1 1 0 0 0 1 NA 2 0 0
#> ckd solid_tumor leuk lym aids cci_score estimated_10_year_survival
#> 1 1 1 1 0 0 14 0%
#> 2 1 1 1 0 0 16 0%
#> 3 0 1 0 0 1 18 0%
#> 4 0 2 1 1 0 13 0%
#> 5 0 1 0 1 1 16 0%
#> 6 1 0 1 1 1 21 0%
#> 7 0 1 0 0 1 19 0%
#> 8 1 1 0 1 1 20 0%
#> 9 1 1 0 NA 0 NA NA
#> 10 1 2 0 NA 0 NA NA
getting CCI score with amscorer
The EPICES score measures social deprivation through a series of binary responses.
# Example data for EPICES
my_data <- data.frame(
epices_1 = c(1, 0, 1),
epices_2 = c(0, 1, 1),
epices_3 = c(0, 0, 0),
epices_4 = c(1, 0, 0),
epices_5 = c(0, 1, 0),
epices_6 = c(1, 0, 1),
epices_7 = c(0, 1, 0),
epices_8 = c(0, 0, 1),
epices_9 = c(1, 1, 0),
epices_10 = c(0, 0, 1),
epices_11 = c(1, 0, NA)
)
amscorer::epices_score(my_data ,prefix = "epices",replace_na_with_zero = FALSE)
#> epices_1 epices_2 epices_3 epices_4 epices_5 epices_6 epices_7 epices_8
#> 1 1 0 0 1 0 1 0 0
#> 2 0 1 0 0 1 0 1 0
#> 3 1 1 0 0 0 1 0 1
#> epices_9 epices_10 epices_11 epices_score
#> 1 1 0 1 53.84
#> 2 1 0 0 61.54
#> 3 0 1 NA NA
getting only the EPICES score with amscorer
The MELD score evaluates the severity of chronic liver disease.
The D-FRS estimates the risk of developing a postoperative pancreatic fistula after distal pancreatectomy.
The D-FRS estimates the risk of developing a postoperative pancreatic fistula after distal pancreatectomy.
The a-FRS assesses the risk of developing a postoperative pancreatic fistula (POPF) after pancreatoduodenectomy (PD).
Alternative Fistula Risk Score for Pancreatoduodenectomy (a-FRS) is designed to predict the risk of postoperative pancreatic fistula (POPF) after pancreatoduodenectomy (PD).
‘amscorer’ package provides a comprehensive suite of tools for calculating key clinical scores, enhancing the ability to predict patient outcomes and make informed clinical decisions. By following the examples provided in this vignette, users can easily integrate these scoring functions into their clinical practice or research.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.