create_INLA_dat_pair: Prepare pairwise meta-analysis dataset for INLA.

Description Usage Arguments Details Value Examples

Description

create_INLA_dat_pair creates two dataframes, one to use in a contrast based and the other in an arm-based pairwise meta-analysis.

Usage

1
create_INLA_dat_pair(ntrt, nctrl, ptrt, pctrl, cov = NULL)

Arguments

ntrt

Number of subjects in treatment arm

nctrl

Number of subjects in control arm

ptrt

Number of events in treatment arm

pctrl

Number of events in treatment arm

cov

Optional argument to include a covariate in the model

Details

The resulting data.frame can be used as data argument in meta_inla.

Value

A list of two dataframe objects

Examples

1
2
3
4
5
6
data('TBdat')
## Create the dataset suitable for INLA
TBdatINLA <- create_INLA_dat_pair(TBdat$TRT, TBdat$CON, TBdat$TRTTB, TBdat$CONTB)

## Check that the data are correct
print(TBdatINLA)

gunhanb/nmainla documentation built on May 17, 2019, 9:27 a.m.