run_jags: Runs a user-supplied JAGS model and returns the output

Description Usage Arguments Value

View source: R/run_jags.R

Description

Runs a user-supplied JAGS model and returns the output

Usage

1
2
3
run_jags(distribution, prop_haz = TRUE, time, event, trt, chains = 2,
  n_iter = 1000L, n_burn = 1000L, n_adapt = 1000L,
  track_variable_names, progress.bar = "none")

Arguments

distribution

Character. name of the distribution of the parametric model

prop_haz

logical. Should a proportional hazards model be fit (TRUE) or a nonproportional hazards model

time

Positive numeric. survival times

event

0/1 variable. Event happened (event = 1) or observation is censored (event = 0)

trt

0/1 variable. Indicates control arm (trt = 0) or experimental arm (trt = 1)

chains

integer number of MCMC chains to run

n_iter

positive integer number of MCMC iterations, default 100,000

n_burn

positive integer length of burn in, default 1,000

n_adapt

number of iterations for adaption in JAGS

track_variable_names

a character vector giving the names of variables to be monitored

progress.bar

should JAGS show a progress bar, "none" (default_), "text" , or "GUI"

Value

a mcmc.list of posterior draws of parameters in track_variable_names, contains matrix of size (n_iter x track_num_variables)


kravitz-eli/simCondSurv documentation built on April 14, 2020, 6:02 a.m.