Title: | Plotting Decision Curve Analysis with Coloured Bars |
---|---|
Description: | Decision curve analysis is a method for evaluating and comparing prediction models that incorporates clinical consequences, requires only the data set on which the models are tested, and can be applied to models that have either continuous or dichotomous results. The 'ggscidca' package adds coloured bars of discriminant relevance to the traditional decision curve. Improved practicality and aesthetics. This method was described by Balachandran VP (2015) <doi:10.1016/S1470-2045(14)71116-7>. |
Authors: | Qiang Liu [aut, cre] |
Maintainer: | Qiang Liu <[email protected]> |
License: | GPL-3 |
Version: | 0.2.3 |
Built: | 2024-12-17 06:33:37 UTC |
Source: | CRAN |
A survival data on breast cancer.
data(Breastcancer)
data(Breastcancer)
An object of class data.frame
with 660 rows and 12 columns.
data(Breastcancer)
data(Breastcancer)
Generate data for plotting survival analysis decision curves.
data |
a data frame containing the variables in the model. |
outcome |
the outcome, response variable. Must be a variable contained within the data frame specified in data=. |
predictors |
the predictor variable(s). Must be a variable(s) contained within the data frame specified in data=. |
probability |
specifies whether or not each of the independent variables are probabilities. The default is TRUE. |
xstart |
starting value for x-axis (threshold probability) between 0 and 1. The default is 0.01. |
xstop |
stopping value for x-axis (threshold probability) between 0 and 1. The default is 0.99. |
xby |
increment for threshold probability. The default is 0.01. |
ymin |
minimum bound for graph. |
harm |
specifies the harm(s) associated with the independent variable(s). The default is none. |
graph |
specifies whether or not to display graph of net benefits. The default is TRUE. |
intervention |
plot net reduction in interventions |
interventionper |
number of net reduction in interventions per interger. The default is 100 |
loess.span |
specifies the degree of smoothing. The default is 0.10. |
timepoint |
specifies the time point at which the decision curve analysis is performed. |
cmprsk |
if evaluating outcome in presence of a competing risk. The default is FALSE |
smooth |
specifies whether or not to smooth net benefit curve. The default is FALSE. |
ttoutcome |
Enter the time variable in your data. |
legend.position |
Set the position of the legend. |
This function was created and written by Dr Andrew Vickers to generate decision curve data.
Returns a data for plotting a decision curve.
You can use it to plot decision curves for multiple generative analysis or competitive risk models.
... |
Fill in multiple survival analysis or competitive risk models. You cannot mix and match. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
merge |
If true is selected it will merge the two long zones. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
Splitface |
Name the faceted image. |
A picture.
Generate data for plotting survival analysis decision curves.
data |
a data frame containing the variables in the model. |
outcome |
the outcome, response variable. Must be a variable contained within the data frame specified in data=. |
predictors |
the predictor variable(s). Must be a variable(s) contained within the data frame specified in data=. |
probability |
specifies whether or not each of the independent variables are probabilities. The default is TRUE. |
xstart |
starting value for x-axis (threshold probability) between 0 and 1. The default is 0.01. |
xstop |
stopping value for x-axis (threshold probability) between 0 and 1. The default is 0.99. |
xby |
increment for threshold probability. The default is 0.01. |
ymin |
minimum bound for graph. |
harm |
specifies the harm(s) associated with the independent variable(s). The default is none. |
graph |
specifies whether or not to display graph of net benefits. The default is TRUE. |
intervention |
plot net reduction in interventions |
interventionper |
number of net reduction in interventions per interger. The default is 100 |
loess.span |
specifies the degree of smoothing. The default is 0.10. |
smooth |
specifies whether or not to smooth net benefit curve. The default is FALSE. |
This function was created and written by Dr Andrew Vickers to generate decision curve data.
Returns a data for plotting a decision curve.
A medical examination related data.
data(demo)
data(demo)
An object of class data.frame
with 832 rows and 34 columns.
data(demo)
data(demo)
A data for competitive risk modelling.
data(df_surv)
data(df_surv)
An object of class tbl_df
(inherits from tbl
, data.frame
) with 750 rows and 9 columns.
data(df_surv)
data(df_surv)
A data for random forest analysis.
data(LIRI)
data(LIRI)
An object of class data.frame
with 232 rows and 6 columns.
data(LIRI)
data(LIRI)
netdata
netdata( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
netdata( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A data used for plotting.
netdata.ksvm
## S3 method for class 'ksvm' netdata( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'ksvm' netdata( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A data used for plotting.
Types of transformation of survival analysis models into competitive risk models.
newcrr(fit, cencode = 0, failcode = 1)
newcrr(fit, cencode = 0, failcode = 1)
fit |
Modelling for Survival Analysis. |
cencode |
Censor status, default is 0. |
failcode |
Events of interest, default is 1. |
A list of competing risk model formats.
You can use it to generate a decision curve with coloured bars.
scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
Table 1 represents the relationship between the baseline values of the data. This function can be easily done.Creates 'Table 1', i.e., description of baseline patient characteristics, which is essential in every medical research. Supports both continuous and categorical variables, as well as p-values and standardized mean differences.
A picture.
library(survival) library(reshape2) library(ggplot2) ##Import the internal data of the R package bc<-Breastcancer ##Categorical variables converted to factors bc$histgrad<-as.factor(bc$histgrad) bc$er<-as.factor(bc$er) bc$pr<-as.factor(bc$pr) bc$ln_yesno<-as.factor(bc$ln_yesno) ##Generate Survival Analysis Model f1<-coxph(Surv(time,status)~er+histgrad+pr+age+ln_yesno,bc) ##Draw decision curve scidca(f1) scidca(f1,threshold.line = TRUE,threshold.text = TRUE) ##logistic regression model fit<-glm(status~er+histgrad+pr+age+ln_yesno,family = binomial(link = "logit"),data=bc) ##Draw decision curve scidca(f1) scidca(f1,threshold.line = TRUE,threshold.text = TRUE) ##random forest model library(randomForest) LIRI<-LIRI set.seed(1) index <- sample(2,nrow(LIRI),replace = TRUE,prob=c(0.7,0.3)) traindata <- LIRI[index==1,] testdata <- LIRI[index==2,] traindata$status<-as.factor(traindata$status) #Modelling random forests fit<-randomForest(status ~ANLN+CENPA+GPR182+BCO2 ,data=traindata,ntree=500, important=TRUE,proximity=TRUE) scidca(fit,newdata = traindata) scidca(fit,newdata = testdata ) scidca(fit,newdata = testdata ,threshold.line = TRUE,threshold.text = TRUE)
library(survival) library(reshape2) library(ggplot2) ##Import the internal data of the R package bc<-Breastcancer ##Categorical variables converted to factors bc$histgrad<-as.factor(bc$histgrad) bc$er<-as.factor(bc$er) bc$pr<-as.factor(bc$pr) bc$ln_yesno<-as.factor(bc$ln_yesno) ##Generate Survival Analysis Model f1<-coxph(Surv(time,status)~er+histgrad+pr+age+ln_yesno,bc) ##Draw decision curve scidca(f1) scidca(f1,threshold.line = TRUE,threshold.text = TRUE) ##logistic regression model fit<-glm(status~er+histgrad+pr+age+ln_yesno,family = binomial(link = "logit"),data=bc) ##Draw decision curve scidca(f1) scidca(f1,threshold.line = TRUE,threshold.text = TRUE) ##random forest model library(randomForest) LIRI<-LIRI set.seed(1) index <- sample(2,nrow(LIRI),replace = TRUE,prob=c(0.7,0.3)) traindata <- LIRI[index==1,] testdata <- LIRI[index==2,] traindata$status<-as.factor(traindata$status) #Modelling random forests fit<-randomForest(status ~ANLN+CENPA+GPR182+BCO2 ,data=traindata,ntree=500, important=TRUE,proximity=TRUE) scidca(fit,newdata = traindata) scidca(fit,newdata = testdata ) scidca(fit,newdata = testdata ,threshold.line = TRUE,threshold.text = TRUE)
scidca.coxph
## S3 method for class 'coxph' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'coxph' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
scidca.crr
## S3 method for class 'crr' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'crr' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
scidca.glm
## S3 method for class 'glm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'glm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
scidca.ksvm
## S3 method for class 'ksvm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'ksvm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
This parameter is indispensable in the random forest decision curve. Fill in your data. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
scidca.randomForest
## S3 method for class 'randomForest' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'randomForest' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
This parameter is indispensable in the random forest decision curve. Fill in your data. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
scidca.svm
## S3 method for class 'svm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
## S3 method for class 'svm' scidca( fit, newdata = NULL, timepoint = "median", cmprsk = FALSE, modelnames = NULL, merge = FALSE, y.min = NULL, xstop = NULL, y.max = NULL, pyh = NULL, relcol = "#c01e35", irrelcol = "#0151a2", relabel = "Nomogram relevant", irrellabel = "Nomogram irrelevant", text.size = 4.5, text.col = "green", colbar = TRUE, threshold.text = FALSE, threshold.line = FALSE, nudge_x = 0, nudge_y = 0, threshold.linetype = 2, threshold.linewidth = 1.2, threshold.linecol = "black", po.text.size = 4, po.text.col = "black", po.text.fill = "white", liftpec = NULL, rightpec = NULL, legend.position = c(0.85, 0.75) )
fit |
Fill in the model you want to analyze. Support survival analysis and logistic regression. |
newdata |
This parameter is indispensable in the random forest decision curve. Fill in your data. |
timepoint |
If it is a survival analysis, fill in the point in time you need to study. The default is the median time. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
merge |
If true is selected it will merge the two long zones. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
A picture.
Generate data for plotting survival analysis decision curves.
data |
a data frame containing the variables in the model. |
outcome |
the outcome, response variable. Must be a variable contained within the data frame specified in data=. |
predictors |
the predictor variable(s). Must be a variable(s) contained within the data frame specified in data=. |
probability |
specifies whether or not each of the independent variables are probabilities. The default is TRUE. |
xstart |
starting value for x-axis (threshold probability) between 0 and 1. The default is 0.01. |
xstop |
stopping value for x-axis (threshold probability) between 0 and 1. The default is 0.99. |
xby |
increment for threshold probability. The default is 0.01. |
ymin |
minimum bound for graph. |
harm |
specifies the harm(s) associated with the independent variable(s). The default is none. |
graph |
specifies whether or not to display graph of net benefits. The default is TRUE. |
intervention |
plot net reduction in interventions |
interventionper |
number of net reduction in interventions per interger. The default is 100 |
loess.span |
specifies the degree of smoothing. The default is 0.10. |
timepoint |
specifies the time point at which the decision curve analysis is performed. |
cmprsk |
if evaluating outcome in presence of a competing risk. The default is FALSE |
smooth |
specifies whether or not to smooth net benefit curve. The default is FALSE. |
ttoutcome |
Enter the time variable in your data. |
This function was created and written by Dr Andrew Vickers to generate decision curve data.
Returns a data for plotting a decision curve.
You can use it to plot decision curves for multiple binary classification models.
... |
Fill in multiple binary classification models. Cannot populate correlation models with time. |
newdata |
If the decision curve of the validation set is to be analysed. Fill in the validation set data here. |
cmprsk |
If it is a competitive risk model, select TRUE here. |
modelnames |
Defines the name of the generated image model. |
y.min |
The maximum value of the negative part of the picture. Generally defaults to positive values multiplied by 0.4. |
xstop |
The maximum value of the X-axis of the picture. |
y.max |
The maximum value of the Y-axis. The default value is the maximum net benefit. |
pyh |
The height at which the bars are plotted cannot exceed y.min. |
relcol |
The colour of the relevant part of the bar. The default is red. |
irrelcol |
The colour of the irrelevant part of the bar. The default is blue. |
relabel |
Relevance Tags. |
irrellabel |
No relevant tags. |
text.size |
Font size. |
text.col |
The colour of the font. |
colbar |
The default is true, and if false is selected, bar plotting is cancelled. |
merge |
If true is selected it will merge the two long zones. |
threshold.text |
The default is FALSE, if TRUE is selected, a text message for the threshold will be added. |
threshold.line |
The default is FALSE, and if TRUE is selected, lines for the threshold will be added. |
nudge_x |
Used to adjust the x-axis position of the point where the threshold is located. |
nudge_y |
Used to adjust the y-axis position of the point where the threshold is located. |
threshold.linetype |
The line shape of the threshold line. |
threshold.linewidth |
The line width of the threshold line. |
threshold.linecol |
The colour of the threshold line. |
po.text.size |
The size of the threshold point text. |
po.text.col |
The colour of the threshold point text. |
po.text.fill |
The background of the threshold point text. |
liftpec |
Threshold point left displacement. |
rightpec |
Threshold point right displacement. |
legend.position |
Set the position of the legend. |
Splitface |
Name the faceted image. |
A picture.