View source: R/create_MetaStan_dat.R
create_MetaStan_dat | R Documentation |
create_MetaStan_dat
converts datasets in the one-study-per-row
format to one-arm-per-row format,
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
## 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.