run_facts | R Documentation |
Run FACTS trial simulations.
run_facts( facts_file, output_path = tempfile(), log_path = output_path, n_burn = NULL, n_mcmc = NULL, n_weeks_files = 10000, n_patients_files = 10000, n_mcmc_files = 0, n_mcmc_thin = NULL, flfll_seed = NULL, flfll_offset = NULL, n_sims, ... )
facts_file |
Character, name of a FACTS file.
Usually has a |
output_path |
Character, directory path to the files to generate. |
log_path |
Character, path to the log file generated by FLFLL. |
n_burn |
Number of burn-in iterations for the MCMC. |
n_mcmc |
Number of MCMC iterations used in inference. |
n_weeks_files |
Number of |
n_patients_files |
Number of |
n_mcmc_files |
Number of |
n_mcmc_thin |
Number of thinning iterations for the MCMC. |
flfll_seed |
Positive integer, random number generator seed for FLFLL.
This seed is only used for stochastic preprocessing steps for generating
the |
flfll_offset |
Integer, offset for the random number generator. |
n_sims |
Positive integer, number of simulations per param file. |
... |
Named arguments to the appropriate FACTS engine function.
Use |
run_facts()
calls run_flfll()
and then run_engine()
.
For finer control over trial simulation, you can call these
latter two functions individually.
Character, path to the directory with FACTS output.
run_flfll()
, run_engine()
, get_facts_engine()
# Can only run if system dependencies are configured: if (file.exists(Sys.getenv("RFACTS_PATHS"))) { facts_file <- get_facts_file_example("contin.facts") # example FACTS file out <- run_facts( facts_file, n_sims = 4, verbose = FALSE ) # What results files do we have? head(get_csv_files(out)) # Read all the "patients*.csv" files with `read_patients(out)`. # For each scenario, we have files named # patients00001.csv, patients00002.csv, patients00003.csv, # and patients00004.csv. read_patients(out) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.