GaPloth {BGPhazard} | R Documentation |
Plots for the Hazard and Survival Function Estimates
Description
Plots the hazard function and with the survival function estimates defined by the Markov gamma process with and without covariates (Nieto-Barajas & Walker, 2002).
Usage
GaPloth(
M,
type.h = "segment",
addSurvival = T,
intervals = T,
confidence = 0.95,
summary = FALSE
)
Arguments
M |
tibble. Contains the output by |
type.h |
character. "segment"= use segments to plot hazard rates, "line" = link hazard rates by a line |
addSurvival |
Logical. If |
intervals |
logical. If TRUE, plots confidence bands for the selected functions including Nelson-Aalen and/or Kaplan-Meier estimate. |
confidence |
Numeric. Confidence level. |
summary |
Logical. If |
Details
This function returns estimators plots for the resulting hazard rate as it is computed by GaMRes and CGaMRes 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 credible/confidence intervals.
Value
SUM.h |
Numeric tibble. Summary for the mean, median, and a
|
SUM.S |
Numeric tibble. Summary for
the mean, median, and a |
References
- Nieto-Barajas, L. E. (2003). Discrete time Markov gamma processes and time dependent covariates in survival analysis. Bulletin of the International Statistical Institute 54th Session. Berlin. (CD-ROM).
- Nieto-Barajas, L. E. & Walker, S. G. (2002). Markov beta and gamma processes for modelling hazard rates. Scandinavian Journal of Statistics 29: 413-424.
See Also
GaMRes, CGaMRes, CGaPlotDiag, GaPlotDiag
Examples
## 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)
## Example 2
# data(leukemiaFZ)
# timesFZ <- leukemiaFZ$time
# deltaFZ <- leukemiaFZ$delta
# GEX2 <- GaMRes(timesFZ, deltaFZ, type.c = 4)
# GaPloth(GEX2)