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

View source: R/prepare.functions.R

get.closest.timeR Documentation

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))

Arguments

network

An object of class "mb.network".

t

The time point at which

Value

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

Examples


# 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)


MBNMAtime documentation built on Oct. 14, 2023, 5:08 p.m.