data.prep: Data preparation

View source: R/data.prep.R

data.prepR Documentation

Data preparation

Description

Puts data into appropriate form for subsequent analysis using BUGSnet.

Usage

data.prep(arm.data, varname.t, varname.s)

Arguments

arm.data

Data with 1 row for each study arm.

varname.t

A string indicating the name of the treatment variable.

varname.s

A string indicating the name of the study variable.

Value

data.prep returns an object of class BUGSnetData which is a list containing the following components:

arm.data - A tibble containing the arm level study data

treatments - A list of all treatments in the network

studies - A list of all studies in the network

n.arms - A tibble containing the number of arms for each study

varname.t - A string containing the name of the treatment variable

varname.s - A string containing the name of the study variable

See Also

net.plot, net.tab, data.plot, nma.model

Examples

data(diabetes.sim)

diabetes.slr <- data.prep(arm.data = diabetes.sim, 
varname.t = "Treatment", 
varname.s = "Study")

diabetes.slr$arm.data
diabetes.slr$treatments
diabetes.slr$studies

audrey-b/BUGSnet documentation built on Feb. 2, 2025, 5:10 p.m.