View source: R/plot_dynamic_HR.R
plot_dynamic_HR | R Documentation |
Plots the dynamic hazard ratio of a cox or CSC supermodel
plot_dynamic_HR( supermodel, covars, CI = T, cause, end_time, extend = F, silence = F, xlab = "LM time", ylab, ylim, main, logHR = T, ... )
supermodel |
An object of class "LMcoxph" or "LMCSC", i.e. a fitted supermodel |
covars |
Vector or list of strings indicating the variables to plot the HR of (note these must be given without time interaction label, for e.g., as in LMcovars). |
CI |
Include confidence intervals or not, default is TRUE |
cause |
Cause of interest if considering competing risks |
end_time |
Final time point to plot HR, defaults to the last landmark point used in model fitting. |
extend |
Argument to allow for HR to be plot at landmark times that are later than the LMs used in model fitting. Default is FALSE. If set to TRUE, the HR may be unreliable. |
silence |
silence the warning message when end_time > LMs used in fitting the model |
xlab |
x label for the plots |
ylab |
y label for the plots |
ylim |
y limit for the plots |
main |
Vector of strings indicating the title of each plot. Must be in the same order as covars. |
logHR |
Boolean, if true plots the log of the hazard ratio, if false plots the hazard ratio |
... |
Additional arguments passed to plot |
See the Github for example code
Plots for each variable in covars showing the dynamic hazard ratio
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.