drop.disconnected: Drop studies that are not connected to the network reference...

Description Usage Arguments Value Examples

View source: R/prepare.functions.R

Description

Drop studies that are not connected to the network reference treatment

Usage

1
drop.disconnected(network, connect.dose = FALSE)

Arguments

network

An object of class mbnma.network.

connect.dose

A boolean object to indicate whether treatments should be kept in the network if they connect via the simplest possible dose-response relationship (TRUE) or not (FALSE). Simplest possible dose-response relationship is any function with a single dose-response parameter (e.g. linear, exponential)

Value

A list containing a single row per arm data frame containing only studies that are connected to the network reference treatment, and a character vector of treatment labels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Using the triptans headache dataset
network <- mbnma.network(HF2PPITT)
drops <- drop.disconnected(network)

# No studies have been dropped since network is fully connected
length(unique(network$data.ab$studyID))==length(unique(drops$data.ab$studyID))


# Make data with no placebo
noplac.df <- network$data.ab[network$data.ab$narm>2 & network$data.ab$agent!=1,]
net.noplac <- mbnma.network(noplac.df)

# Studies are dropped as some only connect via the dose-response function
drops <- drop.disconnected(net.noplac, connect.dose=FALSE)
length(unique(net.noplac$data.ab$studyID))==length(unique(drops$data.ab$studyID))

# Studies are not dropped if they connect via the dose-response function
drops <- drop.disconnected(net.noplac, connect.dose=TRUE)
length(unique(net.noplac$data.ab$studyID))==length(unique(drops$data.ab$studyID))

MBNMAdose documentation built on Sept. 13, 2020, 5:08 p.m.