R/facts_engines.R,R/run_engine_aipf_contin.R,R/run_engine_aipf_dichot.R, and 6 morefacts_engines.RdThese functions are the inner functions called byrun_engine(). In this help file, only the most common engine functionsare listed. To identify the appropriate engine functionfor your FACTS file, callget_facts_engine().
run_engine_aipf_contin(): Enrichment continuous.
run_engine_aipf_dichot(): Enrichment dichotomous.
run_engine_aipf_tte(): Enrichment time to event.
run_engine_contin(): Core continuous.
run_engine_crm(): continual reassessment method (CRM).
run_engine_dichot(): Core dichotomous.
run_engine_multep(): Multiple endpoint.
run_engine_tte(): Time to event.
run_engine_aipf_contin(param_files, n_sims=1L, mode=c("","r"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, current_week=NULL, execdata=NULL, final=NULL, interim=NULL, mcmc_num=NULL, verbose=FALSE, version=NULL)run_engine_aipf_dichot(param_files, n_sims=1L, mode=c("","r"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, current_week=NULL, execdata=NULL, final=NULL, interim=NULL, mcmc_num=NULL, verbose=FALSE, version=NULL)run_engine_aipf_tte(param_files, n_sims=1L, mode=c("","r"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, current_week=NULL, execdata=NULL, final=NULL, interim=NULL, mcmc_num=NULL, verbose=FALSE, version=NULL)run_engine_contin(param_files, n_sims=1L, mode=c("s","r","p"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, arm_selection=NULL, armsdropped=NULL, complete_data_analysis=NULL, current_week=NULL, execdata=NULL, final=NULL, fsimdata=NULL, fsimexp=NULL, fsimparam=NULL, interim=NULL, keepfiles=NULL, mcmc_num=NULL, noadapt=NULL, s2_aux_paramfile=NULL, stage=NULL, verbose=FALSE, version=NULL)run_engine_crm(param_files, n_sims=1L, mode=c("s",""), directory=".", allocator=NULL, charting_info=NULL, estimator=NULL, force_cohort=NULL, reduced_priority=NULL, version=NULL, verbose=FALSE)run_engine_dichot(param_files, n_sims=1L, mode=c("s","r","p"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, arm_selection=NULL, armsdropped=NULL, complete_data_analysis=NULL, current_week=NULL, execdata=NULL, final=NULL, fsimdata=NULL, fsimexp=NULL, fsimparam=NULL, interim=NULL, keepfiles=NULL, mcmc_num=NULL, noadapt=NULL, s2_aux_paramfile=NULL, stage=NULL, verbose=FALSE, version=NULL)run_engine_multep(param_files, n_sims=1L, mode=c("s","r","p"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, arm_selection=NULL, armsdropped=NULL, complete_data_analysis=NULL, current_week=NULL, execdata=NULL, final=NULL, fsimdata=NULL, fsimexp=NULL, fsimparam=NULL, interim=NULL, keepfiles=NULL, mcmc_num=NULL, noadapt=NULL, s2_aux_paramfile=NULL, stage=NULL, verbose=FALSE, version=NULL)run_engine_tte(param_files, n_sims=1L, mode=c("s","r","p"), seed=NULL, analysis_data=NULL, analysis_mode=NULL, arm_selection=NULL, armsdropped=NULL, complete_data_analysis=NULL, current_week=NULL, execdata=NULL, final=NULL, fsimdata=NULL, fsimexp=NULL, fsimparam=NULL, interim=NULL, keepfiles=NULL, mcmc_num=NULL, noadapt=NULL, s2_aux_paramfile=NULL, stage=NULL, verbose=FALSE, version=NULL)Character vector of file paths or the outputofprep_param_files(). If a character vector, the elementscan be directories containing*.param files or the paths to the*.param files themselves.Such a directory is returned byrun_flfll().
Positive integer, number of simulations per param file.
Character scalar:"s" for simulation mode in non-enrichmentdesigns,"" for simulation mode in enrichment designs,"r" for execution mode, and"p" for prediction mode.For the CRM engine,mode needs to be"s" or"".
Positive integer, random number generator seed for theactual trial simulations. Use thisseed argument instead offlfll_seed (run_facts(),run_flfll()) to controlpseudo-randomness in the actual trial simulations.flfll_seedonly controls how the*.param files are generated.
Character, analysis mode patient data file name.
Logical, whether to activate analysis mode.
Numeric, current time in weeks.
Character, name of the execution mode patient file.
Logical, whether to do the final analysis.For execution mode only.
Integer, interim number.
Integer, MCMC file number. For analysis mode only.
Logical, whether to print progress information to the Rconsole.
Character scalar, version of FACTS corresponding to theFACTS file. Get by callingget_facts_version() on your FACTS file.See possible versions withget_facts_versions().Do not supplyversion torun_engine().run_engine()detects the version automatically from the FACTS file andpasses it to the appropriate engine function.
Logical, whether to activate arm selection.
Character, a comma-separated collection of integersindicating dropped arms.
Logical, whether to do a completedata analysis.
Character, prediction mode patient data file name.
Logical. For expert use only.
Character, name of the prediction mode*.param file.
Logical, whether to deactivate cleanup ofextraneous staged design files.
Logical, whether to deactivate adaptive actionsin prediction mode.
Character, name of the stage 2 executionauxiliary*.param file.
Integer, trial design stage. For staged designs only.
Character, working directory. CRM only.
Logical, allocator/execution/recommender mode. CRM only.
Logical, unused.
Logical, use estimator. CRM only.
Logical, whether to force small cohort run-in to end.CRM only.
Logical, whether to run at reduced priority.CRM only.
Nothing.
If you need to repeatedly invoke an engine, as with mosttrial execution mode workflows, these engine functions may be slowon their own. To avoid the most severe sources of slowness,consider runningprep_param_files()and then passing the result to one of the individual enginefunctions (such asrun_engine_contin()).
facts_file<-get_facts_file_example("contin.facts")# Can only run if system dependencies are configured:if(file.exists(Sys.getenv("RFACTS_PATHS"))){out<-run_flfll(facts_file, verbose=FALSE)# Generate param files.# Identify which engine you need.get_facts_engine(facts_file)# Run the sims with the engine function or `run_engine()`.run_engine_contin(out, n_sims=1, verbose=FALSE, version="6.2.5")read_patients(out)}