Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/create_MetaStan_dat.R
create_MetaStan_dat
converts datasets in the one-study-per-row
format to one-arm-per-row format,
1 2 3 4 5 | create_MetaStan_dat(
dat = NULL,
armVars = c(dose = "d", responders = "r", sampleSize = "n"),
nArmsVar = "nd"
)
|
dat |
Data in one-study-per-row format. |
armVars |
Vector of per-arm variables The name of each component will be the column name in the resulting dataset. |
nArmsVar |
Variable holding the number of arms for each study. |
The resulting data.frame can be used as data argument in MBMA_stan
.
A data frame with the generated columns.
Burak Kuersad Guenhan, burak.gunhan@med.uni-goettingen.de and Gert van Valkenhoef
gemtc::mtc.data.studyrow
and nmaINLA::create_INLA_dat
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data('dat.Eletriptan')
## Create the dataset suitable for MBMA_stan
EletriptanDat <- create_MetaStan_dat(dat = dat.Eletriptan,
armVars = c(dose = "d",
responders = "r",
sampleSize = "n"),
nArmsVar = 'nd')
## Check that the data are correct
print(EletriptanDat)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.