data("nma.baker2009")
# \donttest{
# Read results from 'run_model' (using the default arguments)
res <- readRDS(system.file('extdata/res_baker.rds', package = 'rnmamod'))
# Read results from 'run_metareg' (exchangeable structure)
reg <- readRDS(system.file('extdata/reg_baker.rds', package = 'rnmamod'))
# Publication year as the covariate
pub_year <- c(1996, 1998, 1999, 2000, 2000, 2001, rep(2002, 5), 2003, 2003,
rep(2005, 4), 2006, 2006, 2007, 2007)
# The names of the interventions in the order they appear in the dataset
interv_names <- c("placebo", "budesonide", "budesonide plus formoterol",
"fluticasone", "fluticasone plus salmeterol",
"formoterol", "salmeterol", "tiotropium")
# Plot the results from both models for all comparisons with salmeterol and
# publication year 2000
metareg_plot(full = res,
reg = reg,
compar = "salmeterol",
cov_value = list(2000, "publication year"),
drug_names = interv_names)
# }
Run the code above in your browser using DataLab