
Extract shrinkage factors from a JointModelSamples object
Source: R/JointModelSamples.R
shrinkage.JointModelSamples.RdExtracts all sampled variables whose names start with
prior_shrinkage_factors_, including those generated by horseshoe priors on
survival and longitudinal coefficients. These are prior shrinkage factors,
distinct from the tumour-shrinkage rate in a longitudinal model.
Usage
# S3 method for class 'JointModelSamples'
shrinkage(object, ...)Value
A posterior draws object containing the shrinkage factors, with
iterations, chains, and variable order preserved. It can be summarised
with posterior::summarise_draws().
Details
Survival coefficient factors retain their covariate names. Longitudinal
coefficient factors are labelled longitudinal.<predictor>:<covariate>, for
example longitudinal.mu_g:age or longitudinal.omega_s:armB. Their
covariate names are obtained from covariates.LongitudinalModel(). Factors
without a known covariate mapping retain their Stan variable names.
Survival-only and longitudinal-only fits are supported. An error is raised if no prior shrinkage factors were sampled or if sampled indices cannot be matched to a known design matrix.
See also
Other shrinkage:
shrinkage()