This function combines posterior draws from multiple joint model fits into a single set of draws.
consensus(object, parm, method = c("union", "equal_weight", "var_weight"),
seed = 123L)An object of class "consensus_jm" with components:
methodthe selected method.
parmthe requested parameter(s) block(s).
n_splitsnumber of fits combined.
drawsnamed list of combined draw matrices (one per parameter block).
weightsfor "equal_weight" and "var_weight", a named list of weight matrices.
n_drawsnumber of combined draws per parameter block.
summarynamed list of summary matrices with Mean, StDev, 2.5%, 97.5%, and P).
seedseed used.
an object of class "sliced_jm".
a character vector with the names of parameters to combine. These
must correspond to elements in fit$mcmc[[parm]] for each fit
(e.g., "gammas", "alphas", "betas1", "betas2").
the consensus method used to combine draws.
"union"concatenate draws across slices (no averaging).
"equal_weight"compute an iteration-wise simple average across slices.
"var_weight"compute an iteration-wise weighted average across slices using inverse-variance weights.
an integer seed used for the within-slice random permutation step
(used by "equal_weight" and "var_weight").
Pedro Miranda-Afonso p.mirandaafonso@erasmusmc.nl