studyCM_matrix: Contribution matrix of frequentist net-meta

Description Usage Arguments Value Examples

View source: R/studyCM_matrix.R

Description

To calculate the contribution matrix.

Usage

1
studyCM_matrix(comp.all, nmt)

Arguments

comp.all

all comparisoin

nmt

results from model_netmeta function

Value

matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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))

nmt1 <- model_netmeta(long.data = LDT1,
treatment=LDT1$treatment,
id.treatments = trt1,
reference = "A",
outcome = "HR")

name1 <- NULL
for(i in 1:(length(trt1$id)-1)){
  name1 <- c(name1, paste0(trt1$id[i], ":", trt1$id[-(1:i)]))
}

study.CM1 <- studyCM_matrix(name1, nmt1)

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