BayesPiecewiseLinearLogHazard: Samples from the PLLH model without covariates.
Description
Samples from the Piecewise Linear Log-Hazard (PLLH) model and returns a list containing posterior parameters and posterior restricted mean survival.
Usage
BayesPiecewiseLinearLogHazard(Y, I1, Poi, B)
Value
Returns a list containing posterior samples of (1) the split point locations, (2) the log-hazards at each split point, (3) the number of split points, (4) the variance parameter for the log-hazard values, (5) the posterior mean restricted survivial time.
##Generate DataY=rweibull(20,4,1)
I=rbinom(20,1,.5)
##Hyperparameter for number of split pointsPoi=5##Number of iterations for MCMCB=200BayesPiecewiseLinearLogHazard( Y, I, Poi, B)