Added nobs() for the number of subjects.
glance() now also reports event counts, measurement counts
for each longitudinal outcome, the parameter count used by AIC and BIC,
and convergence status, including fits without post-fit standard
errors.
Added terms(), model.frame(), and
model.matrix() methods for a selected longitudinal outcome
or the event model. New fits retain evaluated model frames and
contrasts. coef() and vcov() can now select
matching sets of regression coefficients while preserving their existing
default results.
Extended tidy() with component and outcome labels,
an option to return both model components, and exponentiated survival
estimates and confidence limits. Both bootSE and broom’s
boot_se argument are accepted. Standard errors and test
statistics remain on the log-hazard scale when estimates are
exponentiated.
Added anova() comparisons for fitted joint models.
Likelihood-ratio tests require nested covariate models fitted to the
same observations, with unchanged random-effects and association
structures. Likelihoods are re-evaluated using common Halton integration
points, and p-values are withheld when the statistic is negative or
numerically unstable. Use test = FALSE for a comparison
table without a test (#4).
mjoint() now accepts an optional seed
argument for reproducible model fitting, including Monte Carlo
integration and post-fit calculations. The previous R random-number
state is restored when a seed is supplied. The default
seed = NULL retains the existing behaviour (#5).
glance() now names its residual standard-deviation
columns sigma_1, sigma_2, and so on, replacing
the misleading sigma2_1, sigma2_2, etc. Update
scripts that select these columns by name.
summary(fit)$sigma now uses the outcome names returned by
sigma(fit), or sigma_j names for unnamed
outcomes. The numerical values and stored residual variances in
coef(fit)$sigma2 are unchanged (#62).Simulated dynamic predictions now sample random effects
conditional on each new parameter draw using Gaussian rejection
sampling. This replaces the single Metropolis-Hastings update that could
retain random effects from the preceding parameter draw and distort
predicted values and intervals. The scale argument is
deprecated and ignored; max.proposals limits attempts for
each draw, and returned proposals and accept
values describe rejection-sampling efficiency. Failure stops the
prediction without discarding parameter draws. The
parameter-distribution approximation remains unchanged.
Dynamic survival predictions now accumulate hazards between the conditioning and prediction times, avoiding undefined ratios when both unconditional survival probabilities round to zero.
Random-effects polynomial, spline, and scaled time terms now use the same fitted basis at measurement, event, and prediction times. Older models fitted with inconsistent bases must be refitted; prediction checks now identify this incompatibility.
Dynamic predictions now retain the fitted factor levels, contrast matrices, and design-column order for both sub-models. Changing R’s contrast options no longer changes predictions from an existing fit, and new factor levels are rejected.
Simulated dynamic predictions now draw residual variances on the log scale, using the delta method to transform the full joint covariance matrix. This prevents negative residual-variance draws and can change predicted values and intervals. Fitted estimates and reported standard errors are unchanged. Invalid fitted variances, unusable covariance matrices, and numerical overflow or underflow now produce informative errors.
mjoint() now rejects unsupported survival formula
terms before fitting, including strata(),
offset(), cluster(), tt(),
frailty terms, and penalised terms. Previously, these could be ignored,
cause unclear errors, or produce a model that differed from the
specified formula. The survival model supports ordinary baseline
covariates with one common baseline hazard, together with the latent
association structure.
Models with a single distinct observed event time now retain the matrix dimensions needed for fitting and the baseline-hazard history.
Subject-specific fitted values, residuals, ranef(),
and augment() now explain when posterior random effects are
unavailable and advise refitting with pfs = TRUE and
checking convergence. Population-level fitted values and residuals
remain available without post-fit calculations.
Parallel bootstrap fitting now stops its R processes on
completion or error and preserves existing parallel settings in the
calling R session. It uses the parallel package directly;
doParallel and foreach are now optional
packages used for testing.
Declared a minimum RcppArmadillo version of
0.12.6.6.0, which provides the thread-control functions used during
fitting.
Corrected residual-scale terminology: summaries now print “Residual standard deviations”, and bootstrap output prints “Residual variances”. Corrected the documentation for stored variances, simulation inputs, and bootstrap uncertainty. Thanks to @ellessenne for reporting the ambiguity (#62).
Tidying methods now reject unsupported arguments instead of
silently ignoring them. The joineRML methods are used consistently when
broom is loaded before or after joineRML. augment() matches
supplied original data by subject and measurement time, preserving the
supplied row order, and rejects changed observations or incompatible
observation schedules.
Longitudinal and survival records are now matched explicitly by subject ID, independently of row order or factor-level order. Missing IDs, unmatched subject sets, duplicate survival records, and missing survival-model values are rejected before fitting.
The default "sas" convergence criterion now uses
absolute parameter changes consistently. Models can require additional
iterations and return different estimates when the previous rule stopped
prematurely.
Simulated event indicators now preserve censoring for every
subject, including the first subject and subjects with infinite event
times. Datasets with no events are retained, and mjoint()
reports clearly that at least one observed event is required.
Fitted values and residuals now retain the correct lengths and observation order when subjects have equal numbers of measurements.
Bootstrap standard errors and confidence intervals now support models with a single longitudinal fixed-effect coefficient or a single survival association coefficient.
Intercept-only longitudinal fixed-effects models now retain the dimensions needed for estimation, coefficient histories, and approximate standard errors.
Gompertz survival-time simulation now handles zero subject-specific time slopes using the exponential limit and improves numerical accuracy near zero.
The reported joint log-likelihood is now evaluated at the returned coefficients, including when post-fit statistics are omitted or the model has not converged. This also corrects the likelihood used in AIC and BIC. The iteration history continues to record likelihoods before each parameter update.
BIC(), summary(), and
glance() now consistently use the number of subjects for
the BIC penalty. The nobs attribute of
logLik() therefore reports subjects rather than
longitudinal measurements.
Dynamic survival predictions now reject non-positive or non-finite horizons and non-finite explicit prediction times.
tidy() examples in the broom vignette and
help page to use conf.int = TRUE, so the returned tables
include confidence intervals. Also corrected the vignette’s bootstrap
example to use bootSE. Thanks to @eribul for reporting the confidence-interval
issue (#80).bootSE() parallel branch condition was
ncores >= 1L (always TRUE), making the
serial code path with the progress bar unreachable. Corrected to
ncores > 1L.
mjoint() now correctly throttles the number of
threads used by RcppArmadillo during the MCEM algorithm via
armadillo_throttle_cores() (restored on exit).
simData() now uses drop = FALSE when
subsetting the random effects matrices in the Gompertz
(model = "intslope") survival-time calculation, preventing
a latent dimension-dropping error when only a single subject remains in
the branch.
Internal initial-value calculation for the survival sub-model
(initsSurv()) no longer relies on a leaked loop variable
when indexing timeVar; it now uses the (outcome-invariant)
first time variable explicitly in the balanced-data case.
plot.ranef.mjoint() now uses
geom_errorbar(orientation = "y") instead of the deprecated
geom_errorbarh(), eliminating ggplot2 4.0 deprecation
warnings.
simData() now reports the simulated event rate via
message() rather than cat(), so output can be
suppressed with suppressMessages().
vcov.mjoint() now warns when it falls back to the
Moore-Penrose pseudo-inverse, as the approximate standard errors may be
unreliable in that case.
Fixed documentation typos: “left hand-hand side” in
mjoint(), “comprised on” in the package description, and
“The choice os” in dynSurv() and
dynLong().
Updated README: badges and MRC logo.
Removed CXX11 requirement from Makevars files.
Update plot.ranef.mjoint() function due to
deprecated aes_string() call.
Fixed deprecated documentation for
joineRML.R.
Updated broken links in plot.ranef.mjoint.R and
vcov.mjoint.R.
Updated GitHub actions workflows.
Ran reverse dependency checks using revdepcheck
package.
Updated CITATION file due to deprecated function and typo.
Wrapped a bunch of examples from being run on CRAN submission to avoid Debian system NOTE.
Reduced computational time for vignettes to to try and avoid Debian system NOTE on CRAN submission.
Add R-hub workflow to enable checks for platforms not covered already.
Imported RcppArmadillo functions
armadillo_throttle_cores and
armadillo_reset_cores to try and prevent CRAN R CMD checks
using multiple threads.
Package SUGGESTS are now conditional in the vignettes per CRAN requirement.
mjoint() now returns the input inits
and the interim calculated initial values calculated for the EM
algorithm step: inits.long and inits.surv.
Requested by James Murray.
Updated Makevars and Makevars.win due to compilation issues.
Updated Makevars and Makevars.win to remove clang4 dependency.
Updated URL in DESCRIPTION.
Fixed couple of typos.
Moved to GitHub Actions CI.
Updated URLs.
broom compatibility.Added @ellessenne as package author.
Updates to DESCRIPTION.
Documentation updates.
Graeme Hickey taken over the package as creator and maintainer.
Updates to DESCRIPTION.
Updates to Makevars and Makevars.win.
Updates to appveyor.yml and .travis.yml settings.
Updates to .gitignore.
Added Zenodo DOI badge to README.
Added ORCID IDs for authors.
Remove unused objects once finished with them to try and reduce memory overheads.
Changed maintainer to Pete Philipson.
Added smoothed predicted survival curves to the
plot.dynSuv(). Smoothing is based on the constrained
B-splines method.
dynSurv() now includes an argument to specify a
horizon time from the last known observation time.
simData() now includes an argument to choose
multivariate t-distributed random effects with varying degrees
of freedom, thus allowing for sensitivity analyses of heavier tail
distributions.
Minor corrections to documentation.
Minor bug fixes to plotting functions.
Added MRC to DESCRIPTION as funder.
Added Depsy badge to README.
The MCEM algorithm can be implemented with vanilla Monte Carlo
and quasi-Monte Carlo (using either the scrambled Sobol sequence or the
Halton sequence). This is implemented through the type
argument passed to the list of control parameters in
mjoint().
bootSE() now has option to use parallel computing
via the foreach package.
Fixed some small errors in the epileptic.qol
dataset.
Fixed situation where a tibble might be given as the dataset (#55 @ellessenne).
Catches errors in bootstrap due to “bad” data and automatically restarts the bootstrap (#57 @ellessenne).
Added hex sticker badge.
Moved the make files and raw data for qol and
renal datasets into the ~/data-raw/
directory.
Added @ellessenne as package contributor for testing and bug corrections (PRs #55 and #57).
Added new functions dynSurv() and
dynLong(), which generates survival probabilities and
expected longitudinal predictions, respectively, for a new subject
conditional on their last measurement time and longitudinal history.
Prediction can be implemented using either a first order approximation
or a Monte Carlo simulation approach.
Added an associated print() method for
dynSurv and dynLong objects.
Added an associated plot() method for
dynSurv and dynLong objects.
Added a function baseHaz() for extracting the
centered and uncentered estimates of the baseline hazard
function.
print() and summary() now report the
total computation time in addition to just the EM algorithm time. This
was deemed useful after some examples showed that the time to get
initial values was more expensive than the time for the MCEM algorithm
to converge.
Fixed a bug that prevented models being fitted with no covariates
in the survival sub-model, i.e. Surv() ~ 1.
Correction to the vignette description of mjoint()
arguments.
Removed enumintem package for Sweave vignette to
satisfy CRAN checks on macOS (release).
Updated Makevars and Markvars.win to
allow for OpenMP, which can be used by RcppArmadillo.
Minor tidy-up of in-code comments.
Minor updates and corrections to documentation.
Added unit tests for new features.
Changed the technical vignette to Rnw (with engine = Sweave) from ltx (with engine = R.rsp) in attempt to remove some CMD check warnings.
Shortened the vignette to make it compile quicker (removed execution of bootstrapping).
Lots of tweaks of minor formatting tweaks in the documentation.
Fixed a bug that prevented factors with >2 levels being included in the time-to-event sub-model.
Fixed package registration, which strangely broke on R 3.4.0 for OSX platform.
joineRML version 0.2.1 will depend on R version
>=3.3.0 to remedy issue with sigma.mjoint() S3
issue.
Added a new badge to the README.
Add residual() and fitted() functions
for mjoint objects.
Added a plot function – plot.ranef.mjoint() – for
ranef.mjoint objects.
bootSE() now uses control parameters from fitted
model and allows for individual parameter overwrite.
Added a check that any initial covariance matrix given is positive-definite.
Added a check that dimensions of any inits given
match the calculated dimensions from the model formulae.
Added a check that if multiple repeated longitudinal outcomes were given, that each subject contributes at least one measurement per outcome.
Changed the API so that postRE and
approx.se arguments are now replaced by a single
pfs argument, which stands for post fit statistics. If
TRUE, then both the approximate SEs and the BLUPs
(and SEs) are calculated and returned. This change is to facilitate
other post fit statistics, e.g. residuals.
sampleData() now allows for sampling
without replacement.
plot() and plotConvergence() now have
the option to discard burn-in phase iterations from the MCEM
algorithm.
plot() and plotConvergence() now plot
the log-likelihood trace.
vcov() now calculates the variance-covariance matrix
rather than inside mjoint() and then extracting it. It also
utilises the QR-decomposition inverse function and the Moore-Penrose
matrix inverse, as in some cases the matrix was nearly
singular.
hessian() (and therefore vcov()) now
calculate the contribution for the random effect variance terms rather
than the random effect precision (1 divided by the variance) terms. The
correct contribution to the score for off-diagonal terms is now also
impleted.
The left-hand side of the formLongFixed now handles
transformations.
vcov() now returns the variance-covariance matrix as
intended. Previously it was only returning the profile empirical
information matrix.
Patched a major bug in gammaUpdate() where ties in
failure times were not being properly handled. The code for
gammaUpdate_approx() always worked fine, as it was based
only on the score vector. This bug manifested when bootSE()
was called due to the resampling with replacement yielding datasets with
many more ties than in the original dataset used to fit the model. To
fix it, the information matrix required scaling at each failure time by
the number of failures in the data. The formula for the information
matrix in the Technical Details vignette has also been updated.
Patched a minor bug with prevented univariate random-intercept models for being fitted.
Patched a minor bug in plotting convergence traces.
Patched a minor bug with bootstrapping univariate joint models
without passing the MLEs as the initial values to the
mjoint() call.
Renamed approxSE() function to
hessian().
Renamed control argument earlyPhase to
burnin.
Default settings for control parameters updated
based on practical experience.
Package now Depends on survival and
nlme rather than Imports to allow
require() statements to be removed from code.
Prevented roxygen from exporting all
functions.
Fixed Imports following CRAN Checks of v0.1.1.
Minor documentation edits and corrections.
Minor code tidy-up with slight speed-ups and stabilisations where found.
LICENSE upgraded to GPL-3 to be compatible with
joineR v1.1.0.
Removed internal function fast_nearPD() from package
code as was unused.
Removed internal function EexpArma() from package
code as was unused.
Added unit tests.
Registered native C++ routines and disabled symbol search to satisfy CRAN CMD checks.