make_report | R Documentation |
Constructs the automated report from the output of the NMA.
make_report(nma_model, ext = "pdf", echo = FALSE, ...)
ext |
A string of text to indicate the extension of the
resulting output file. Possible options are |
echo |
A string (default to |
... |
Additional parameters. |
## Not run:
bugs_params <-
list(
PROG = "openBugs", # which version of BUGS to use to run the MCMC
N.BURNIN = 10,#00, # number of steps to throw away
N.SIMS = 150,#0, # total number of simulations
N.CHAINS = 2, # number of chains
N.THIN = 1, # thinning rate
PAUSE = TRUE)
RANDOM <- FALSE # is this a random effects model?
REFTX <- "X" # reference treatment
data_type <- c("hr_data", "surv_bin_data", "med_data") # which type of data to use
label_name <- "label_name"
file_name <- here::here(file.path("inst", "extdata", "survdata_"))
survDataHR <-
read.csv(paste0(file_name, "hr_test.csv"),
header = TRUE,
as.is = TRUE)
survDataBin <-
tryCatch(
read.csv(paste0(file_name, "bin_test.csv"),
header = TRUE,
as.is = TRUE),
error = function(e) NA)
survDataMed <-
tryCatch(
read.csv(paste0(file_name, "med_test.csv"),
header = TRUE,
as.is = TRUE) %>%
mutate(medR = floor(medR)),
error = function(e) NA)
nma_model <-
new_NMA(survDataHR = survDataHR,
survDataMed = survDataMed,
survDataBin = survDataBin,
bugs_params = bugs_params,
is_random = RANDOM,
data_type = data_type,
refTx = REFTX ,
effectParam = "beta",
label = "",
endpoint = "")
nma_model
make_report(nma_model, ext = "docx")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.