BePloth {BGPhazard}  R Documentation 
Plots for the discrete Hazard and Survival Function Estimates
Description
Plots the resulting hazard function along with the survival function estimates defined by the Markov beta process (NietoBarajas and Walker, 2002).
Usage
BePloth(
M,
type.h = "dot",
add.survival = T,
intervals = T,
confidence = 0.95,
summary = FALSE
)
Arguments
M 
tibble. Contains the output generated by 
type.h 
character, "line" = plots the hazard rate of each interval joined by a line, "dot" = plots the hazard rate of each interval with a dot. 
add.survival 
logical, If 
intervals 
logical. If TRUE, plots confidence bands for the selected functions including NelsonAalen and/or KaplanMeier estimate. 
confidence 
Numeric. Confidence band width. 
summary 
Logical. If 
Details
This function returns estimators plots for the hazard rate as computed
by BeMRes
together with the NelsonAalen estimate along with their
confidence intervals for the data set given. Additionally, it plots the
survival function and the KaplanMeier estimate 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. & Walker, S. G. (2002). Markov beta and gamma processes for modelling hazard rates. Scandinavian Journal of Statistics 29: 413424.
See Also
Examples
## Simulations may be time intensive. Be patient.
## Example 1
# data(psych)
# timesP < psych$time
# deltaP < psych$death
# BEX1 < BeMRes(timesP, deltaP, iterations = 3000, burn.in = 300, thinning = 1)
# BePloth(BEX1)
# sum < BePloth(BEX1, type.h = "line", summary = T)
## Example 2
# data(gehan)
# timesG < gehan$time[gehan$treat == "control"]
# deltaG < gehan$cens[gehan$treat == "control"]
# BEX2 < BeMRes(timesG, deltaG, type.c = 2, c.r = rep(50, 22))
# BePloth(BEX2)