Learn R Programming

MBNMAtime (version 0.2.6)

get.closest.time: Create a dataset with a single time point from each study closest to specified time

Description

Takes the closest time point from each arm in each study to a specified time (t) within an mb.network object. Useful for network plots or exploring standard NMA.

Usage

get.closest.time(network, t = stats::median(network$data.ab$time))

Value

A data frame in long format of responses at the closest time point to t in each arm of each study.

Arguments

network

An object of class "mb.network".

t

The time point at which

Examples

Run this code

# Using the alogliptin dataset
network <- mb.network(alog_pcfb)

# Take a single follow-up time from each study...
# ...closest to 7
get.closest.time(network, t=7)

# ...closest to 20
get.closest.time(network, t=7)

# ...closest to the median follow-up across all studies
get.closest.time(network, t=26)

Run the code above in your browser using DataLab