# Little bugs in survHE

Earlier this week, while I was working on my second-last lecture of the year (I’ve been relatively good and the vast majority of the new material I had to prepare to make everthing accessible — and I also took the chance to give my slides a little makeover, mostly learning and enjoying xaringan — but this one I kind of forgot I had to do it, so I needed to kind of do it quickly this week… But as usual, I digress…), I discovered a little bug in survHE.

Basically, when I was working on the major update (which has been released to CRAN as version 1.1.2), I have restructured almost entirely the package (I spoke about it here). But in doing so, I have messed up slightly the call to the Bayesian Gompertz model using HMC.

It’s only a little bug, because what I had done wrong is to setup a silly default prior — so under the CRAN version, if you try to run

m=fit.models(..., distr="gom",method="hmc")

i.e. without specifying a prior for the model parameters, survHE will assume that you are modelling the shape of the Gompertz sampling distribution as $$\alpha \sim {\sf Gamma}(a_\alpha,b_\alpha)$$ and then $$a_\alpha = 0$$, which obviously breaks the code, because it implies that the underlying Gamma variable is outside of its possible range $$(0,\infty)$$.

Even on the CRAN version, this is an easy fix — only need to specify a less stupid prior, e.g.

m=fit.models(...,distr="gom",method="hmc",priors=list(gom=list(a_alpha=0.1,b_alpha=0.1)))

(or something like that — you just need to avoid setting $$a_\alpha$$ to 0).

I’ve also updated the whole code in the devel version of the GitHub repository — installing from there avoids the issue entirely and you can use default priors, if you so wish…