| BayesPiecewiseHazardTrt {BayesReversePLLH} | R Documentation | 
Samples from the PEH Cox model with a patient covariate vector.
Description
Samples from the Piecewise Linear Log-Hazard (PLLH) Cox model and returns a list containing posterior parameters and posterior restricted mean survival.
Usage
BayesPiecewiseHazardTrt(Y, I1, Trt, Poi, B)
Arguments
Y | 
 Vector of event or censoring times.  | 
I1 | 
 Vector of event indicators.  | 
Trt | 
 Vector containing patient treatment/control assignment.  | 
Poi | 
 Prior mean number of split points.  | 
B | 
 Number of iterations for MCMC.  | 
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 treatment coefficient, (6) the mean restricted survivial time of the control therapy, (7) the mean restricted survival time of the treatment therapy.
Examples
##Generate Data
Y=rweibull(20,4,1)
I=rbinom(20,1,.5)
Trt=rbinom(20,1,.5)
##Hyperparameter for number of split points
Poi=5
##Number of iterations for MCMC
B=200
BayesPiecewiseHazardTrt( Y, I,Trt, Poi,  B)
[Package BayesReversePLLH version 1.5 Index]