library(survHE)
data(bc)
=fit.models(formula=Surv(recyrs,censrec)~group,data=bc,distr=c("exp","wei","gom"))
mplot(m,mods=c(2,3),add.km=TRUE)
Fixes in survHE
I know… long time no speak and the rest… I do feel a bit guilty about it — and I do have lots of good excuses for not having posted almost at all in the recent past and definitely at all in the past 3 months (lockdown-cum-homeschooling is something I may want to discuss separately…).
Anyway: a piece of news on survHE
. This has first come out in exchange with Ash Bullement, whom I’m jointly supervising in his PhD at Sheffield — Ash has found the time to break the current CRAN version of survHE
and we’ve been back and forth in the Autumn to solve them. Which I think I have.
But, for several reasons, I’ve only integrated these (fairly minor, to be fair!) changes in the development version of survHE
— I have suggested that “newcomers” installed that, but I will get onto the business of updating the CRAN release (back to the lockdown-cum-homeschooling, I will have to anyway to avoid more serious issues with other packages updates. Again, just haven’t got around to doing it — but the nice CRAN people are understanding…).
Long story short, if you run something like
basically you plan to fit the Exponential, Weibull and Gompertz models to some data and using a specific formulation for the linear predictor. Then you want to plot the survival curves for only the Weibull and Gompertz distributions (not for the Exponential), adding the Kaplan-Meier estimates to the plot. But, in the current CRAN version, the plot
function has a minor problem and if you don’t specify (among others) the first model selected in the vector distr
, the plot doesn’t show the KM curves.
The same code in the latest, development version, does the job and produces the plot below.
The survHE
page and the GitHub repo give details on how to install the development version.