forest_table_plot: Forest-table plot of net-meta model for MD, HR, and RR

Description Usage Arguments Value Examples

View source: R/forest_table_plot.R

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
forest_table_plot(
  type = c("bayesian", "all"),
  bmt,
  nmt = NULL,
  digits = 2,
  x1,
  x2,
  x.lab,
  title.size,
  text.size,
  point.size = 4,
  labels = NULL,
  plot.scale = 0.9,
  font.family = "Helvetica"
)

Arguments

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"

Value

ggplot object

Examples

 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)

meta2020/net.meta documentation built on March 30, 2021, 7:31 p.m.