plot.jointSurroPenal | R Documentation |
Plots estimated baseline survival and hazard functions for the surrogate endpoint and the true endpoint from an object of class 'jointSurroPenal'. Confidence bands are allowed.
## S3 method for class 'jointSurroPenal'
plot(x, type.plot = "Hazard", conf.bands=TRUE,
pos.legend = "topright", cex.legend=0.7, main, Xlab = "Time",
Ylab = "Baseline hazard function", median = TRUE, xmin = 0, xmax = NULL,
ylim = c(0,1), endpoint = 2, scale = 1, ...)
x |
An object inheriting from |
type.plot |
A character string specifying the type of curve. Possible value are "Hazard", or "Survival". The default is "Hazard". Only the first letters are required, e.g "Haz", "Su". |
conf.bands |
Logical value. Determines whether confidence bands will be plotted. The default is to do so. |
pos.legend |
The location of the legend can be specified by setting this argument to a single keyword from the list '"bottomright"', '"bottom"', '"bottomleft"', '"left"', '"topleft"', '"top"', '"topright"', '"right"' and '"center"'. The default is '"topright"'. |
cex.legend |
Character expansion factor *relative* to current 'par("cex")'. Default is 0.7. |
main |
Title of plot. |
Xlab |
Label of x-axis. Default is '"Time"'. |
Ylab |
Label of y-axis. Default is '"Baseline hazard function"'. |
median |
Logical value. Determines whether survival median will be plotted. Default is TRUE. |
xmin |
Minimum value for x-axis, the default is |
xmax |
Maximum value for x-axis, the default is |
ylim |
Range of y-axis. Default is from 0 to 1. |
endpoint |
A binary that indicates the endpoint to represent. |
scale |
A numeric that allows to rescale (by multiplication) the survival times. If no change is need the argument is set to 1, the default value. eg: 1/365 aims to convert days to years . |
... |
other unused arguments. |
Print a plot of the baseline survival or hazard functions for each type of event or both with the confidence bands or not (conf.bands argument)
jointSurroPenal, jointSurroCopPenal
## Not run:
###--- Joint surrogate model ---###
###---evaluation of surrogate endpoints---###
data(dataOvarian)
joint.surro.ovar <- jointSurroPenal(data = dataOvarian, n.knots = 8,
init.kappa = c(2000,1000), indicator.alpha = 0,
nb.mc = 200, scale = 1/365)
# Baseline Hazards fonctions for both the surrogate endpoint
# and the true endpoint
plot(joint.surro.ovar,endpoint = 2,type.plot = "Haz", conf.bands = T)
# Baseline survival fonctions for both the surrogate endpoint
# and the true endpoint
plot(joint.surro.ovar,endpoint = 2,type.plot = "Su", conf.bands = T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.