muhaz function from the
muhaz package.Formula wrapper for the muhaz function from the
muhaz package.
muhaz2(formula, data, subset, max.time, ...)
# S3 method for muhaz2
plot(x, haz.scale=1, ylab="Hazard", ylim=NULL, log="", ...)
# S3 method for muhazList
plot(x, lty=1:5, col=1:length(x), log="", legend.args=list(), ...)
# S3 method for muhaz2
lines(x, ..., haz.scale = 1)
# S3 method for muhazList
lines(x, lty=1, col=1:length(x), ...)
# S3 method for muhazList
summary(object, ...)
# S3 method for muhazList
ggplot(data, mapping=NULL,
xlab="Time", ylab="Hazard", ...,
environment = parent.frame())
# S3 method for muhazList
as.data.frame(x, row.names, optional, ...)
# S3 method for muhaz
as.data.frame(x, row.names, optional, ...)For a single strata, this is a muhaz object. For multiple strata, this is a muhazList object, which includes methods for
formula with the left-hand side being a Surv object, including a time and event indicator, and the right-hand side indicated stratification.
optional data.frame for the Surv object. If this is not provided, then the parent frame
is used for the Surv object.
subset predictate for the dataset
maximum follow-up time for the hazards
graphics argument for xlab (x-axis label)
graphics argument for ylab (y-axis label)
graphics argument for line type
graphics argument for line colour
a list of options that are passed to the legend call. Defaults are list(x="topright",legend=names(x),col=col,lty=lty).
scale for the hazard in the plot
not currently used
muhazList object
graphics argument for the limits of the y axis
graphics argument for a log transformation of the x or y axes
muhazList or muhaz object
*[Deprecated]* Used prior to tidy evaluation.
not currently used
Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.
other arguments
plot(muhaz2(Surv(surv_mm, status == "Dead: cancer")~1, melanoma))
Run the code above in your browser using DataLab