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 CGaMRres and GaMRes.

type.h

character. "segment"= use segments to plot hazard rates, "line" = link hazard rates by a line

addSurvival

Logical. If TRUE, Nelson-Aalen estimate is plotted over the hazard function and Kaplan-Meier estimate is plotted over the survival function.

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 TRUE, a summary for hazard and survival functions is returned as a tibble.

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 confint / 100 confidence interval for each segment of the hazard function. If summary = TRUE

SUM.S

Numeric tibble. Summary for the mean, median, and a confint / 100 confidence interval for a grid of the survival function. If summary = TRUE

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)






[Package BGPhazard version 2.1.1 Index]