CGaPloth function

Plots for the Hazard and Survival Funcion Estimates for the Bayesian non-parametric Markov gamma model with covariates in survival analysis.

Plots for the Hazard and Survival Funcion Estimates for the Bayesian non-parametric Markov gamma model with covariates in survival analysis.

Plots the resulting hazard function along with the survival function estimate defined by the Markov gamma process with covariates (Nieto-Barajas, 2003).

CGaPloth( M, new_obs = NULL, type.h = "segment", coxSurv = T, intervals = T, confidence = 0.95, summary = FALSE )

Arguments

  • M: tibble. Contains the output generated by CuMRres.
  • new_obs: tibble. The function calculates the hazard rates and survival function estimates for specific individuals expressed in a tibble, the names of the columns have to be the same as the data input.
  • type.h: character. "segment"= use segments to plot hazard rates, "line" = link hazard rates by a line
  • coxSurv: logical. Add estimated Survival function with the Cox-Model
  • intervals: logical. If TRUE, plots confidence bands for the selected functions including Cox-Model.
  • confidence: Numeric. Confidence level.
  • summary: logical. If TRUE, a summary for hazard and survival functions is returned as a tibble.

Returns

  • 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 each segment of the survival function. If summary = TRUE

Details

This function return plots for the resulting hazard rate as it is computed by CGaMRes and the quantile of Tao specified by the user aswell as anannotation. In the same plot the credible intervals for both variables are plotted; The mean of Pi is also annotated. Additionally, it plots the survival function with their corresponding credible intervals.

Examples

## Simulations may be time intensive. Be patient. # ## Example 1 # data(leukemiaFZ) # leukemia1 <- leukemiaFZ # leukemia1$wbc <- log(leukemiaFZ$wbc) # CGEX1 <- CGaMRes(data = leukemia1, K = 10, iterations = 100, thinning = 1) # CGaPloth(CGEX1)

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

CGaMRes ,

  • Maintainer: Emilio Akira Morones Ishikawa
  • License: GPL (>= 2)
  • Last published: 2023-09-03