plot.coxreg {eha} | R Documentation

## Plot method for `coxreg` objects

### Description

A plot of a baseline function of a `coxreg` fit is produced, one curve for each stratum.

### Usage

    ## S3 method for class 'coxreg'
    plot(x, fn = c("cum", "surv", "log", "loglog"), fig = TRUE,
      xlim = NULL, ylim = NULL, main = NULL, xlab = "Duration", ylab = "",
      col, lty, printLegend = TRUE, newdata = NULL, ...)

### Arguments

`x` | A `coxreg` object
`fn` | What should be plotted? Default is "cumhaz", and the other choices are "surv", "log", and "loglog".
`fig` | logical. If `TRUE` the plot is actually drawn, otherwise only the coordinates of the curve(s) are returned.
`xlim` | Start and end of the x axis.
`ylim` | Start and end of the y axis.
`main` | A headline for the plot
`xlab` | Label on the x axis.
`ylab` | Label on the y axis.
`col` | Color of the curves. Defaults to 'black'.
`lty` | Line type(s).
`printLegend` | Either a logical or a text string; if `TRUE`, a legend is printed at a default place, if `FALSE`, no legend is printed. Otherwise, if a text string, it should be one of "bottomleft", "bottomright", "topleft", etc., see `legend` for all possibe choices.
`newdata` | Not used
`...` | Other parameters to pass to the plot.

### Value

An object of class `hazdata` containing the coordinates of the curve(s).

[Package eha version 2.6.0 Index]