New fits save lprior for prior-sensitivity analysis with priorsense. Custom Stan models must use braced bodies for conditional or loop statements containing priors: write if (condition) { x ~ normal(0, 1); } rather than if (condition) x ~ normal(0, 1);, and likewise use braces with else, for and while. Automatic prior-density conversion does not support unbraced bodies, so previously valid custom models using this syntax need updating before they can compile. This requirement also keeps truncation normalisation within the intended condition or loop.
Added prior_flat() for a constant prior density on the model parameter scale, with a configurable distribution used only for initial values.
Added package-defined exponential and positive-branch square prior transformations through transform in scalar prior helpers or prior_transform(), with automatic Jacobians, mapped truncation bounds and initial values. Updated the quickstart, statistical specification, extension guide.
Added longitudinal models supporting covariate modeling: LongitudinalRandomSlopeCov, LongitudinalSteinFojoCov, LongitudinalGSFCov and LongitudinalClaretBrunoCov classes implement the corresponding covariate versions of the already existing longitudinal models. Please see the quick start vignette for a short introduction. It is also possible to add new custom longitudinal models with covariates; a new vignette has been added to describe the required components.
LongitudinalModel objects now have a new slot scaled_variance which stores the used variance option, and this is part of the print output now thereby transparently communicating to the user the choice of the multiplicative or additive error model.
Changed default longitudinal model option scaled_variance to FALSE, corresponding to an additive error model (both for the simulation as well as for the inference functions). Also added this option to the random effects model for consistency with the other models.
Included new populationHR() function to calculate population effects from a JointModelSample object, by marginalising over the patient-level random effects (#447).
Included new LongitudinalRandomEffects() function which can be used to extract the patient-level random effects parameter samples from a JointModelSample object (#423).
Introduced the saveObject() method for JointModelSample objects in order to serialise them to disk (#431).
Added support for truncated prior distributions e.g. you can now apply a normal prior to a strictly positive parameter and jmpost will take care of adjusting the density accordingly (#429).
Added prior_normal_vector() which can be used to assign different normal prior distributions to the coefficients of the survival model covariates.
Added prior_const() and prior_const_vector() which fixes a parameter (vector) at a constant value, i.e. uses a point-mass prior distribution.
Added prior_horseshoe() which uses a horseshoe prior for the components of a parameter vector, typically the coefficients of the survival model covariates.
The Stan files associated with models no longer hardcode the parameter declarations. This task is now handled with the Prior objects. If a constant value is used for a parameter instead of a prior distribution, then this parameter is declared in the data block and reassigned in the transformed_parameters block.
Included new Gamma distribution survival model (#411).
Reworked LOO calculations to apply to each individual submodel and disabled LOO calculations for the overall joint model (#402).