Description Usage Arguments Value Examples
View source: R/forest_table_plot.R
To give the forest plot with table of bayesian results from model_gemtc or combined forest plot of bayesian results, frequentist results, and prediction interval from model_gemtc and model_netmeta.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
type |
the type of plots, bayesian-bayesian result; all-bayesian, freq, and prediction interval |
bmt |
bayesian net-meta result from model_gemtc |
nmt |
frequentist net-meta result from model_nemeta |
digits |
digits of the results |
x1 |
the left xlim |
x2 |
the right xlim |
x.lab |
label in the x-axis |
title.size |
title size |
text.size |
font size |
point.size |
point size |
labels |
label of the whole plot |
plot.scale |
the scaled size of the whole plot |
font.family |
"Helvetica" or "Times New Roman" |
ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | LDT1 <- read.csv(system.file("extdata", "HR_SH_D.csv", package = "net.meta"))
trt1 <- read.table(system.file("extdata", "HR_SH_D.txt", package = "net.meta"),
header=TRUE,quote = '"', stringsAsFactors=FALSE)
trt1$description <- factor(trt1$description, trt1$description)
LDT1$study <- factor(LDT1$study, unique(LDT1$study))
bmt1 <- model_gemtc(
long.data=LDT1,
id.treatments=trt1,
reference="A",
outcome="HR",
mtc.n.adapt = 5000, mtc.n.iter = 10000, mtc.thin = 20)
forest_table_plot(
type="bayesian",
bmt=bmt1,
x.lab = "X caption",
x1=0,
x2=40,
title.size =12,
text.size =4,
digits = 2,
font.family="Helvetica")
nmt1 <- model_netmeta(long.data = LDT1,
treatment=LDT1$treatment,
id.treatments = trt1,
reference = "A",
outcome = "HR")
# View(nmt1)
forest_table_plot(
type="all",
bmt=bmt1,
nmt=nmt1,
x.lab = "X caption",
x1=0,
x2=50,
title.size =12,
text.size =4,
digits = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.