Derive a normal prior for the log hazard scale parameter based on a guess at survival times
Source:R/priors.R
p_meansurv.Rd
Derive a normal prior for the log hazard scale parameter based on a
guess at survival times. The scale parameter is hard to interpret,
and depends on the spline knots. However for any scale parameter,
we can determine the spline coefficients that give a constant
hazard (mspline_constant_coefs
). Therefore if we can
guess a typical survival time, we can guess a typical hazard (as 1
divided by the survival time) and deduce the scale parameter. The
prior is then constructed by assuming normality on the log scale,
and assuming the log upper credible limit is two SDs away from the
log median.
Arguments
- median
Best guess (prior median) for a typical survival time
- upper
Upper limit of 95% credible interval for a survival time
- mspline
A list with components
knots
(vector of knots),degree
(polynomial degree) andbsmooth
(logical for smoothness constraint at boundary), defining an M-spline configuration.
Value
A normal prior in the format returned by p_normal
, which can
be passed directly to the prior_hscale
argument in survextrap
.