# NOT RUN {
model <- mtc.model(smoking)
# To save computation time we load the samples instead of running the model
# }
# NOT RUN {
results <- mtc.run(model)
# }
# NOT RUN {
results <- dget(system.file("extdata/luades-smoking.samples.gz", package="gemtc"))
# Creates a forest plot of the relative effects
tbl <- relative.effect.table(results)
# Print the n*n table
print(tbl)
# Plot effect relative to treatment "C"
forest(tbl, "C")
# Write to CSV (e.g. to import to Excel, then use in a Word table)
# }
# NOT RUN {
write.csv(tbl, "smoking-effects.csv")
# }
# NOT RUN {
# Note: use write.csv2 for Western European locales
# }
Run the code above in your browser using DataLab