threemc_initial_pars: Initialise 'thremec' (hyper)parameters.

View source: R/modelling.R

threemc_initial_parsR Documentation

Initialise thremec (hyper)parameters.

Description

Return minimised fit object. Often useful when saving the fit object for later aggregation.

Usage

threemc_initial_pars(
  dat_tmb,
  custom_init = NULL,
  rw_order = NULL,
  rw_order_tmc_ar = FALSE,
  paed_age_cutoff = NULL,
  inc_time_tmc = FALSE
)

Arguments

dat_tmb

list of data required for model fitting, outputted by threemc_prepare_model_data, which includes:

  • design_matricesIncludesX_fixed_mmc, X_fixed_tmc, X_time_mmc, X_age_mmc, X_age_tmc, X_space_mmc, X_space_tmc, X_agetime_mmc, X_agespace_mmc, X_agespace_tmc, X_spacetime_mmc. Design Create design matrices for fixed effects and temporal, age, space and interaction random effects

  • integration matricesIncludes IntMat1, IntMat2. Integration matrices for selecting the instantaneous hazard rate.

  • survival matricesIncludes A_mmc, A_tmc, A_mc, B, C. Survival matrices for MMC, TMC, censored and left censored

  • Q_spacePrecision/Adjacency matrix for the spatial random effects.

custom_init

named list of custom fixed and random model parameters you want to supersede "hardcoded" defaults, default = NULL.

rw_order

Order of the random walk used for temporal precision matrix. Setting to NULL assumes you wish to specify an AR 1 temporal prior. Default: NULL

rw_order_tmc_ar

Whether to use an AR 1 temporal prior for TMC, regardless of whether you are using a RW temporal prior for TMC or not, Default: FALSE

paed_age_cutoff

Age at which to split MMC design matrices between paediatric and non-paediatric populations, the former of which are constant over time. Set to NULL if not desired, Default: NULL

inc_time_tmc

Indicator variable which decides whether to include temporal random effects for TMC as well as MMC, Default: FALSE

Value

Named list of intial (hyper)parameters for threemc_fit_model


mrc-ide/threemc documentation built on Feb. 9, 2024, 5:16 p.m.