update_saved_trials | R Documentation |
This function updates a previously saved "trial_results"
object created and
saved by run_trials()
using a previous version of adaptr
, allowing the
results from these previous simulations to be post-processed (including
performance metric calculation, printing and plotting) without errors by this
version of the package. The function should be run only once per saved
simulation object and will issue a warning if the object is already up to
date. And overview of the changes made according to the adaptr
package
version used to generate the original object is provided in Details.
NOTE: some values cannot be updated and will be set to NA
(the
posterior estimates from the 'final' analysis conducted after the last
adaptive analysis and including outcome data for all patients), and thus
using both raw_ests = TRUE
and final_ests = TRUE
in the
extract_results()
and summary()
functions will lead to missing values for
some of the values calculated for updated simulation objects.
NOTE: other objects created by the adaptr
package, i.e., trial
specifications generated by
setup_trial()
/ setup_trial_binom()
/ setup_trial_norm()
and single
simulation results from run_trials()
when not included in as part of the
returned output from run_trials()
should be re-created by re-running the
relevant code using the updated version of adaptr
; if manually re-loaded
from previous sessions, they may cause errors and problems with the updated
version of the package.
update_saved_trials(path, version = NULL, compress = TRUE)
path |
single character; the path to the saved |
version |
passed to |
compress |
passed to |
The following changes are made according to the version of adaptr
used to
generate the original "trial_results"
object:
v1.2.0+
: updates version number and the reallocate_probs
argument in the embedded trial specification.
v1.1.1 or earlier
: updates version number and everything related
to follow-up and data collection lag (in these versions, the
randomised_at_looks
argument in the setup_trial()
functions did not
exist, but for practical purposes was identical to the number of
patients with available data at each look) and the reallocate_probs
argument in the embedded trial specification.
Invisibly returns the updated "trial_results"
-object.
run_trials()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.