plot.alacoxIC {ALassoSurvIC} | R Documentation |
alacoxIC
objectThe plot
method for alacoxIC
object for plotting the estimated baseline culmulative function and the estimated baseline survival function.
## S3 method for class 'alacoxIC'
plot(x, what = "cum.hazard", xlim, ylim, xlab, ylab, axes = FALSE, ...)
... |
for S4 method only. |
x |
An object of class |
what |
A character string specifying which function will be plotted. Default is "cum.hazard", which plots the estimated baseline cumulative hazard function. Set to "survival" to plot the estimated baseline survival function. |
xlim |
A vector with two elements for the limits of follow-up time. |
ylim |
A vector with two elements for the limits of y-axis. |
xlab |
A label for the x axis. |
ylab |
A label for the y axis. |
axes |
A logical value drawing both axes. Default is |
The x
argument must be the object returned by the alacoxIC
function. Note that plot
provides the conditional survival function for left truncated data, which is analogous to the function (5) of Alioum and Commenges (1996). See the usages in the examples given below.
Alioum, A. and Commenges, D. (1996). A proportional hazards model for arbitrarily censored and truncated data. Biometrics 52, 512-524.
library(ALassoSurvIC)
data(ex_ICLT) # interval censored and left truncated data
lowerIC <- ex_ICLT$lowerIC
upperIC <- ex_ICLT$upperIC
trunc <- ex_ICLT$trunc
X <- ex_ICLT[, -c(1:3)]
result <- alacoxIC(lowerIC, upperIC, X, trunc, theta = 1.5)
plot(result) # plotting the estimated baseline cumulative hazard function by default
plot(result, what = "survival") # plotting the estimated baseline survival function