Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/create_INLA_dat.R
create_INLA_dat converts datasets in the one-study-per-row format to one-arm-per-row format
, then adds indicator (dummy) variables for the basic contrasts,
heterogeneity random effects and design-specific inconsistency random effects and for
correlated multi-arm trials.
1 2 3 4 5 6 7  | create_INLA_dat(
  dat = dat,
  armVars = c(treatment = "t", responders = "r", sampleSize = "n"),
  covariate = "cov",
  design = "des",
  nArmsVar = "na"
)
 | 
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.  | 
covariate | 
 Optional. Vector of study-specific covariate  | 
design | 
 Optional. Vector of study-specific design. We refer design for the set of treatments in each trial.  | 
nArmsVar | 
 Variable holding the number of arms for each study.  | 
The resulting data.frame can be used as data argument in nma_inla.
A data frame with the generated coloumns.
Burak Kuersad Guenhan, burak.gunhan@med.uni-goettingen.de, Rafael Sauter and Gert van Valkenhoef
1 2 3 4 5 6  | data('Smokdat')
## Create the dataset suitable for INLA
SmokdatINLA <- create_INLA_dat(dat = Smokdat, armVars = c('treatment' = 't', 'responders' = 'r'
,'sampleSize' = 'n'), nArmsVar = 'na')
## Check that the data are correct
print(SmokdatINLA)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.