BPSpriorElicit {BayHaz} | R Documentation |
A function to set the hyperparameters of a first order autoregressive BPS prior distribution, approximately assigning constant prior mean hazard rate and corresponding coefficient of variation.
BPSpriorElicit(r0 = 1, H = 1, T00 = 1, ord = 4, G = 30, c = 0.9)
r0 |
prior mean hazard rate (r_0) |
H |
corresponding coefficient of variation |
T00 |
time-horizon of interest (T_infty) |
ord |
spline order (k) |
G |
number of internal spline knots |
c |
correlation coefficient between two consecutive spline weights |
A first order autoregressive BPS prior hazard rate is defined, for 0<t<T_infty, by
rho(t)=exp{sum_{j=1}^{G+k-2} eta_j B_j(t)}
where:
splineDesign
for details)
The spline weights form a stationary AR(1) process with mean m, variance w and lag-one autocorrelation c. The elicitation procedure takes w = H^2 and m = log r_0 - 0.5 * w, based on the mean and variance formulas for the log-normal distribution. As B-spline basis functions form a partition of unity within internal nodes, the mean of rho(t) is approximately equal to r0, for 0<t<T_infty, and its standard deviation to Hr_0.
A list with nine components:
r0 |
prior mean hazard rate (copy of the input argument) |
H |
corresponding coefficient of variation (copy of the input argument) |
T00 |
time-horizon of interest (copy of the input argument) |
ord |
spline order (copy of the input argument) |
G |
number of internal spline knots (copy of the input argument) |
c |
correlation coefficient between two consecutive spline weights (copy of the input argument) |
knots |
full grid of spline knots |
m |
mean of spline coefficients |
w |
variance of spline coefficients |
BayHaz-package
, BPSpriorSample
, BPSpostSample
# ten events per century with unit coefficient of variation and fifty year time horizon # cubic splines with minimal number of knots and strongly correlated spline weights hypars<-BPSpriorElicit(r0 = 0.1, H = 1, T00 = 50, ord = 4, G = 3, c = 0.9)