CCuPloth {BGPhazard}  R Documentation 
Plots for the Hazard and Survival Funcion Estimates
Description
Plots the resulting hazard function and the survival function estimates defined by the bayesian semiparametric cure rate model with an unknown threshold (NietoBarajas & Yin, 2008).
Usage
CCuPloth(
M,
new_obs = NULL,
type.h = "segment",
qn = 0.5,
intervals = T,
confidence = 0.95,
summary = FALSE
)
Arguments
M 
tibble. Contains the output generated by 
new_obs 
tibble. Contains the covariate information for new observations. 
type.h 
character. "segment"= use segments to plot hazard rates, "line" = link hazard rates by a line 
qn 
Numeric. Quantile for Tao (cure time) that should be visualized on the plot. 
intervals 
logical. If TRUE, plots credible intervals. 
confidence 
Numeric. Confidence level. 
summary 
Logical. If 
Details
This function returns estimators plots for the hazard rate as it is computed by CCuMRes and the cure time (quantile of Tao specified by the user) together with credible intervals. Additionally, it plots the survival function and the cure proportion estimates with their corresponding credible 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
 NietoBarajas, L. E. (2003). Discrete time Markov gamma processes and time dependent covariates in survival analysis. Bulletin of the International Statistical Institute 54th Session. Berlin. (CDROM).
NietoBarajas, L. E., & Yin, G. (2008). Bayesian semiparametric cure rate model with an unknown threshold. Scandinavian Journal of Statistics, 35(3), 540556. https://doi.org/10.1111/j.14679469.2007.00589.x
See Also
Examples
## Simulations may be time intensive. Be patient.
## Example 1
# data(BMTKleinbook)
# res < CCuMRes(BMTKleinbook, covs.x = c("tTransplant","hodgkin","karnofsky","waiting"),
# covs.y = c("tTransplant","hodgkin","karnofsky","waiting"),
# type.t = 2, K = 72, length = 30,
# alpha = rep(2,72), beta = rep(2,72), c.r = rep(50, 71), type.c = 2,
# var.delta.str = .1, var.theta.str = 1,
# var.delta.ini = 100, var.theta.ini = 100,
# iterations = 100, burn.in = 10, thinning = 1)
#
# CCuPloth(res, type.h = "segment",qn=.5, summary = T)
#
# new_obs < tibble(tTransplant=c(0,0,0,0),
# hodgkin=c(0,1,0,1),
# karnofsky=c(90,90,60,60),
# waiting=c(36,36,36,36)
# )
#
# ind < CCuPloth(res, new_obs, qn = .5)
# ind