Description Usage Arguments Details
View source: R/predict.tvcure.R
Computes and plots predicted survival curves and cure probabilities at specified values of independent variables
1 2 3 4 5 6 7 8 9 10 11 12 13 |
model |
A model of class tvcure |
type |
The desired quantity to compute. "basesurv" returns the baseline survivor function based on the observed values of the parameters. "suncure" returns the conditional baseline survival function, while "spop" returns the population (i.e., unconditional) survival function. "Uncureprob" returns the probability that an observation is susceptible to failure (i.e., is not cured.) |
variable |
A string containing the name of the variable to plot predicted values for |
values |
A vector of values of variable at which survival curves should be plotted |
newX |
A matrix containing values of hazard variables to calculate predictions for |
newZ |
A matrix containing values of cure variables to calcluate predictions for |
xlab |
A label for the x-axis |
ylab |
A label for the y-axis |
legendtitle |
Title for the plot legend |
internals |
A logical value indicating whether the predictions should be returned. If FALSE, only the graph will be returned. |
Logical |
value indicating whether graphs should be printed in black and white. |
Values to compute survival curves and cure probabilities for may be specified in one of two ways. First, specifying the variable and values arguments will compute a separate prediction for all values of the specified variable, with all other variables set to their median. Second, for more complex predictions, matrices containing new values of the hazard and cure variables may be passed using newX and newZ. Values contained in newX and newZ will override any specified variables and values if both are included. By default, the predict function returns a plot of the desired quantity. To access the underlying quantities estimated, set internals = TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.