Changelog
Source:NEWS.md
frmtmb.survival 0.2.2
- The package code does not use the global assignment operator
<<-, which rOpenSci’s pkgcheck refuses.bhaz()’s argument reader passes the arguments it has read from one step to the next. The results do not change.
frmtmb.survival 0.2.1
Other changes
-
frm_compat()bynl:coxandroyston_parmarare “works”. A body with a level of its own reaches the linear maximum.
frmtmb.survival 0.2.0
Needs frmtmb 0.75.0, whose frmtmb_register_aterm(option =) this package calls when it loads.
New features
brms’s
bhaz()addition term.time | cens(c) + bhaz(df = 6) ~ xwithfamily = cox()is the model ofcox(df = 6): the two fits haveidentical()log likelihoods, estimates and covariance matrices.bhaz()takes brms 2.23.0’s argumentsdf,degree,intercept,knotsandBoundary.knots, and sets the argument of the same name ofcox(). Its basis equals theZbhazandZcbhazof brms’sstandata()to 6.7e-16 of their size or less (the largest difference over the largest entry). At each of 1000 posterior draws of three brms fits, the log likelihood equals the sum of brms’slog_lik()to 1.5e-16 of its size.cox(knots =, Boundary.knots =)set the internal and the boundary knots of the baseline basis, which onlybhaz()could set in brms. Withknots,dfislength(knots) + degree + interceptand need not be given.
Where bhaz() differs from brms
An argument that
bhaz()andcox()both set must have one value.bhaz(df = 6)withfamily = cox(df = 5)stops and names the two.dfandknotsthat disagree stop too, in either place: brms ignoresdfwhenknotsis given. The basis is checked after the two are merged, socox(df = 3)withbhaz(intercept = FALSE)fits.bhaz(gr = g), brms’s stratified Cox model with one baseline per level ofg, stops. The message says thatcox()has one baseline. It tells you to fit each stratum as a model of its own, or to addgto the formula. An unnamed first argument,bhaz(g), isgras in brms;bhaz(6), which brms reads as one stratum named 6, stops and suggestsbhaz(df = 6).A shortened argument name that brms reads is read the same way:
bhaz(d = 6)isdf = 6,kn =isknots,deg =isdegree. A name that brms drops without a message stops and names the argument that was probably meant:bhaz(int = FALSE)andbhaz(inter = FALSE)(brms keeps the intercept),bhaz(Bound = c(0, 30))(brms keeps the default boundary knots). Other names brms does not document, such asbhaz(foo = 1), stop too.warn.outsideis taken and has no effect, as in brms.Boundary knots that do not cover every observed time stop. brms extrapolates the basis past them. With
Boundary.knots = c(0.5, 10)on times from 0.0044 to 14.4, 62 rows lie below the lower knot and 1 above. At equal weights, brms’s cumulative baseline hazard reaches -1.08 there, so the survivor function exceeds one. The hazard is negative for some weights.
Other changes
cox(bhaz = list(df = 6)), the spelling of brms before 2.22.0, stops with the spellings to use instead. Before, it stopped with “unused argument”. brms 2.23.0’scox()has nobhazargument either.A
dfbelowdegree + interceptis still refused when the model is fitted, and the message now gives the right minimum without an intercept: “df must be at least degree (3) without an intercept”.
frmtmb.survival 0.1.0
The first release. It holds the survival families that were in two other packages, so that each has one home. Needs frmtmb 0.74.0, whose frmtmb_family() takes simplex_pars = and aterm_data =.
Breaking changes
cox()andcox_baseline()moved here from frmtmb. Load this package withlibrary(frmtmb.survival), which attaches frmtmb as well.family = "cox"andbrmsfamily("cox")reach this package’scox()once it is loaded, and without it stop with a message that names it. Acox()fit isidentical()to one from frmtmb 0.73.0, in its log likelihood, estimates and standard errors.royston_parmar()andrp_floored()moved here from frmtmb.spline, which is retired, with the article “How to fit a flexible parametric survival model”. A fit isidentical()to one from frmtmb.spline 0.10.2. The curve functions that read a fit,frm_curve(),frm_curve_deriv()andfrm_curve_feature(), are in frmtmb now. They still refuse a fit whose cumulative hazard is not monotone, through the family’spost$curve_checkhook.The refusals of these functions carry the class
frmtmb_survival_error. They carriedfrmtmb_error(cox()) andfrmtmb_spline_error(royston_parmar()) before. All of them still carryfrmtmb_error.frmtmb.spline’s NEWS, the history of
royston_parmar()before the move, is the article “History of frmtmb.spline” on this package’s site.