create_INLA_dat_pair {nmaINLA} | R Documentation |
Prepare pairwise meta-analysis dataset for INLA.
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
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
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)
[Package nmaINLA version 1.1.0 Index]