11.6.3. Running the estimate, exporting and loading chains, and continuing the calculation
The computation can be performed using the standard estimateParameters method, which
automatically saves the chains in their associated files. Although it is generally unnecessary
(since saving is done automatically), it is still possible to manually export the results of a
chain or reload them later using export_chain_MCMC and read_chain_MCMC, whose prototypes
are the following:
# Export one chain
export_chain_MCMC(fileName)
# Read one chain
read_chain_MCMC(fileName)
Both methods take a single string argument specifying the file name used for exporting or loading the chain results.
In most cases, these methods are not required. They become useful when a computation finishes
without reaching convergence and the user wishes to extend the run. This can be done with the
continueCalculation method, which executes additional iterations of the MCMC algorithm in
order to try to achieve convergence. Its prototype is:
continueCalculation(new_Ns)
This method takes a single integer argument that specifies the number of additional iterations
to run. In this case, it may be useful to reload one of the previously computed chains with
read_chain_MCMC before calling continueCalculation. Regardless of which chain is loaded,
the calculation will continue for all initialized chains.