Drop studies that are not connected to the network reference treatment

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

# Using the triptans headache dataset
network <- mbnma.network(triptans)
#> Values for `agent` with dose = 0 have been recoded to `Placebo`
#> agent is being recoded to enforce sequential numbering
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))
#> [1] TRUE


# 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)
#> agent is being recoded to enforce sequential numbering

# 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))
#> [1] FALSE

# 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))
#> [1] TRUE