Major rewrite of the package. The statistical model and the user interface are unchanged, so existing analysis scripts keep working, but the numerical core, the graphics and the documentation have been rebuilt, and several tools for interpreting a fit have been added.
Rcpp and
RcppArmadillo. Results are identical to version 1.0-5 (verified by a
regression test suite against the original implementation), and fitting
is roughly 6 times faster for the plain model, 7 times for the frailty
model and up to 45 times for the jackknife.OMP_NUM_THREADS and can be
capped with the new gcmrecThreads().maxXi = "Brent" is now an implementation of Brent's algorithm working
on the log scale, which is more stable than the previous version.mcf() estimates the mean cumulative function of recurrent events, with
pointwise confidence bands and optional grouping, plus plot() and
print() methods.predict() returns the linear predictor, the relative risk or the
survivor and cumulative hazard curves of given covariate profiles;
plotPredict() draws them.anova() performs likelihood ratio tests between nested models, and in
particular tests whether alpha = 1 (no effect of accumulating
occurrences). It refuses comparisons that are not valid likelihood ratio
tests; see ?anova.gcmrec.plotForest() draws the hazard ratios with their confidence intervals.plotBaseline() compares the baseline functions of several fits on the
same axes.coef(), vcov() and logLik() methods, so AIC() and similar
functions now work on a fit.as_gcmrec_data() is a new S3 generic that normalises the input data.
As a result, gcmrec() and graph.caltimes() accept the legacy list
format directly, without calling List.to.Dataframe() first, and
support for further input formats only requires a new method.theme_gcmrec() gives the package graphics a consistent look and can be
applied to a user's own plots.gcmrec() gains keep.data, which stores the prepared data in the
fitted object so that anova() can refit the model.ggplot objects, which can be restyled
with the usual ggplot2 syntax.plot() on a fit now draws a pointwise confidence band around the
baseline function.graph.caltimes() has been redrawn as an event chart, with a follow-up
segment per subject and a marker for the end of follow-up. Its
sortevents argument, which previous versions accepted but ignored, now
orders subjects by follow-up (default) or by number of events.lines() on a fit is deprecated, since plot() no longer draws on a
base graphics device; use plotBaseline() with a list of models.rhoFunc = "Identity" were
computed from an incomplete coefficient vector, which read past the end
of the vector in the Fortran code. They are now correct.summary() dropped the first covariate coefficient when
rhoFunc = "Identity", mistaking it for alpha.plot() and lines() relied on partial matching of $Surv and $Lam
to reach the Survival and Lambda components of a fit.gcmrec() no longer emits a spurious warning from model.matrix()
about the contrasts argument.roxygen2, with runnable
examples, and the R sources are split one file per function.vignette("gcmrec").testthat, including regression tests that check
the C++ core against results produced by the original Fortran code..rda format with lazy loading.