Plots the resulting hazard function along with the survival function estimate defined by the Markov gamma process (Nieto-Barajas and Walker, 2002).
GaPloth(M, fun = "both", confint = TRUE, h.NA = TRUE, KM = TRUE,
confidence = 0.95, summary = FALSE, legend = TRUE)
List. Contains the information given for lambda and u (generated by GaMRres
).
"h"=plots hazard function; "S"= plots survival function and "both"=plots both the hazard and survival functions.
Logical. If TRUE
, plots confidence bands for the selected functions including Nelson-Aalen and/or Kaplan-Meier estimate.
Logical. If TRUE
, Nelson-Aalen estimate is plotted over the hazard function.
Logical. If TRUE
, Kaplan-Meier estimate is plotted over the survival function.
Numeric. Confidence band width.
Logical. If TRUE
, a summary for hazard and survival functions is returned as a list.
Logical. If FALSE
, legend is not shown.
Numeric matrix. Summary for the mean, median, and a confint / 100
confidence interval for each segment of the hazard function.
Numeric matrix. Summary for the mean, median, and a confint / 100
confidence interval for each segment of the survival function.
The argument fun
is case-sensitive and requires quotations as its class is character.
This function return plots for the resulting hazard rate as it is computed by GaMRes
and the Nelson-Aalen estimate along with their confidence intervals for the data set given. Additionally, it plots the survival function and the Kaplan-Meier estimate with their corresponding confidence intervals.
- Nieto-Barajas, L. E. & Walker, S. G. (2002). Markov beta and gamma processes for modelling hazard rates. Scandinavian Journal of Statistics 29: 413-424.
# NOT RUN {
## Simulations may be time intensive. Be patient.
## Example 1
# data(gehan)
# timesG <- gehan$time[gehan$treat == "6-MP"]
# deltaG <- gehan$cens[gehan$treat == "6-MP"]
# GEX1 <- GaMRes(timesG, deltaG, K = 8, iterations = 3000)
# GaPloth(GEX1, confint = FALSE)
# GaPloth(GEX1, fun = "both", confint = TRUE)
## Example 2
# data(leukemiaFZ)
# timesFZ <- leukemiaFZ$time
# deltaFZ <- leukemiaFZ$delta
# GEX2 <- GaMRes(timesFZ, deltaFZ, type.c = 4)
# GaPloth(GEX2, fun = "both", confint = TRUE)
# }
Run the code above in your browser using DataLab