Description Usage Arguments Details Author(s) Examples
calcurve
function returns a data.frame containing the number of patients, the observed mortality rate and the predicted mortality rate for each category of the predicted mortality rate. If any other acute physiology score is given, the function will also return the mortality rate predicted by this score for each category.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | calcurve(deaths, pred, score = NULL, name_score = "Saps3",
other_score = NULL, name_other_score = NULL,
categories_option = c("predicted", "score"), table = FALSE,
plot = TRUE, title_label = "Calibration Curve",
y1axis_label = "Patients (n)", y2axis_label = "Mortality Rate (%)",
score_color = c("#cac7cc", "#ffc341", "#33cca3"),
bar_color = "#1f77b4", points = c(19, 18, 17))
## S3 method for class 'calcurve'
print(x, ...)
## S3 method for class 'calcurve'
plot(x, ..., main = x$title_label,
text = x$y2axis_label, ylab = x$y1axis_label, col = c(x$bar_color,
x$score_color), pch = x$points)
|
deaths |
a numerical vector that only contains 0 and 1, indicating whether the patient was alive or dead, respectively. |
pred |
a numerical vector that contains the mortality rate predicted by the main score, in percentage, for each patient. |
score |
a numerical vector that contains the main score punctuation for each patient, or NULL. |
name_score |
a character string which determines the name of the main score. |
other_score |
a list of numerical vectors, where each vector contains the mortality rate predicted by other score, in percentage, for each patient, or NULL (the default). |
name_other_score |
if other_score variable is different from NULL, this argument must be a vector with the name(s) of the score(s) given. |
categories_option |
a character string which determines if the categories will refer to the main score or to the predicted mortality rate. Accepted values are 'predicted' (the default) or 'score'. |
table |
logical; if |
plot |
logical; if |
title_label |
main title for |
y1axis_label, y2axis_label |
labels of the main vertical axis and the secondary axis, respectively, for |
score_color |
a vector with the colors to be used in the score traces for |
bar_color |
color of the bars for |
points |
a vector with markers types of the scores for |
x |
an object of class 'calcurve'. |
... |
further arguments passed to |
main |
main title for |
text |
label of the secondary vertical axis for |
ylab |
label of the main vertical axis for |
col |
character vector with the colors of the bars and score traces, in this order, for |
pch |
a vector with markers types of the scores for |
If categories_option = 'score'
, the categories will refer to the deciles of the main score punctuation. If categories_option = 'predicted'
, the categories will refer to fixed intervals of the predicted mortality rate.
Camila Cardoso
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.