Creates a fractional polynomial model plan

plan_fp(
  model.pars,
  bth.model = c("FE", "REINT", "RE"),
  ref.std,
  nma.ref.trt,
  engine = "rjags",
  data.type = "GSD",
  feprior_mean = 0,
  feprior_prec = 1e-04,
  descr = "Fractional polynomial model",
  descr_s = "FP",
  n.chains = NULL,
  n.iter = NULL,
  n.burnin = NULL,
  n.thin = NULL,
  bth.prior = NULL,
  rsd = 13579,
  model.file = NULL,
  ...
)

Arguments

model.pars

A named list containing `exponents` & `t.val` when using GSD

bth.model

One of "FE", "REINT", or "RE"

ref.std

A string containing the reference study

nma.ref.trt

A string containing the reference treatment

engine

Only `rjags` currently supported

data.type

Only "GSD" supported

feprior_mean

A numeric value representing feprior_mean (default 0)

feprior_prec

A numeric value representing feprior_prec default 0.0001

descr

A character string to describe the model

descr_s

Short description

n.chains

A numeric value representing n.chains

n.iter

A numeric value representing n.iter

n.burnin

A numeric value representing n.burnin

n.thin

A numeric value representing n.thin

bth.prior

A list containing type & distr and the parameters of distr. Only required if bth.model != "FE"

rsd

numeric seed to be set

model.file

Path to BUGS file. If NULL file name will be built from input parameters and extracted from BUGScode folder if present

...

any other named arguments must match arguments names from dic.samples or jags functions

Value

A list containing model, engine, analysis and model params

Details

See the vignettes for the specification of bth.prior. Currently parameter names not fully aligned betwen PWE and FP.

Examples

plan_fp(model.pars = list(exponents = 0, t.eval = "midpoint"),
        bth.model = "FE", ref.std = "STUDY2", nma.ref.trt = "B",
        model.file = system.file("BUGScode", "gsd_fracpoly-1o_fe.txt", package = "gemtcPlus"))
#> $model
#> [1] "FP"
#> 
#> $engine
#> [1] "rjags"
#> 
#> $analysis
#> [1] "GSD"
#> 
#> $params
#> $params$seed
#> [1] 13579
#> 
#> $params$model_params
#> $params$model_params$n.chains
#> NULL
#> 
#> $params$model_params$n.iter
#> NULL
#> 
#> $params$model_params$n.burnin
#> NULL
#> 
#> $params$model_params$n.thin
#> NULL
#> 
#> $params$model_params$model.file
#> [1] "/tmp/RtmpiQa6Pm/temp_libpath844d447c83dc/gemtcPlus/BUGScode/gsd_fracpoly-1o_fe.txt"
#> 
#> $params$model_params$parameters
#> [1] "d"  "mu"
#> 
#> 
#> $params$jags_init_params
#> $params$jags_init_params$model.pars
#> $params$jags_init_params$model.pars$exponents
#> [1] 0
#> 
#> $params$jags_init_params$model.pars$t.eval
#> [1] "midpoint"
#> 
#> 
#> $params$jags_init_params$ref.std
#> [1] "STUDY2"
#> 
#> $params$jags_init_params$nma.ref.trt
#> [1] "B"
#> 
#> $params$jags_init_params$feprior_mean
#> [1] 0
#> 
#> $params$jags_init_params$feprior_prec
#> [1] 1e-04
#> 
#> $params$jags_init_params$bth.prior
#> NULL
#> 
#> 
#> $params$deviance_params
#> $params$deviance_params$n.iter
#> NULL
#> 
#> $params$deviance_params$n.thin
#> NULL
#> 
#> $params$deviance_params$type
#> [1] "pD"
#> 
#> 
#> $params$fit_params
#> $params$fit_params$REINT
#> [1] FALSE
#> 
#> $params$fit_params$RE
#> [1] FALSE
#> 
#> $params$fit_params$descr_s
#> [1] "FP"
#> 
#> $params$fit_params$descr
#> [1] "Fractional polynomial model"
#> 
#> 
#>