powered by
Plot method for an object of class `icfit`
# S3 method for icfit plot( x, type = c("hazard", "cumhazard", "survival", "probability"), conf.int = TRUE, ylim = NULL, title = NULL, xlab = NULL, ylab = NULL, fill = TRUE, fillcol = "lightgrey", ... )
A ggplot grob, containing the plot. Use print() or plot() to show it Multiple objects can be combined by using functions in the package gridExtra.
print()
plot()
gridExtra
The object of class 'icfit' to be plotted
Type of plot. Accepted choices: 'hazard' (default), 'cumhazard', 'survival' or 'cumprob'
If `TRUE` a 100*(1 - alpha) percent confidence interval is plotted
The y-limits for the plot
Optional title string
Text for x-label
Text for y-label
Fill area between lower and upper
The color for filling (default 'lightgrey')
Other arguments to plot (except `type`, which is set to 'l')
# \donttest{ icf <- icfit(Surv(left, right, type='interval2') ~ period + gender + age, data = drugusers) plot(icf) # }
Run the code above in your browser using DataLab