Fit a Bayesian model
bayes_model.RdFit a Bayesian model using gemtc
Arguments
- configured_data
list. Input dataset created by
setup_configure()orsetup_exclude()- n_adapt
numeric. Number of adaptation iterations. Defaults to
5000and can normally be left unchanged- n_iter
numeric. Number of simulation iterations. Defaults to
20000and can normally be left unchanged- async
Whether or not the function is being used asynchronously. Default
FALSE
Value
List containing:
- mtcResults
mtc.result. Output from
gemtc::mtc.run()- mtcRelEffects
mtc.result. Output from
gemtc::relative.effect()- rel_eff_tbl
mtc.relative.effect.table. Output from
gemtc::relative.effect.table()- sumresults
summary.mtc.result. Output from
summary(mtcRelEffects)- mtcNetwork
mtc.network. Output from
gemtc::mtc.network()- dic
dataframe. Containing the statistics 'Dbar', 'pD', 'DIC', and 'data points'
- outcome
character. The
outcomefromconfigured_data- outcome_measure
character. The
outcome_measurefromconfigured_data- reference_treatment
character. The
reference_treatmentfromconfigured_data- effects
character. The
effectsfromconfigured_data- seed
numeric. The
seedfromconfigured_data
Examples
configured_data_path <- system.file("extdata", "configured_data.Rds", package = "metainsight")
configured_data <- readRDS(configured_data_path)
# n_adapt and n_iter are set low to run quickly, but should be left as the
# default values in real use
fitted_bayes_model <- bayes_model(configured_data = configured_data,
n_adapt = 100,
n_iter = 100)