OdeModelMCMC | R Documentation |
Used for holding the output of the $sample()
method of the
OdeModel class. Users are not meant to instantiate
objects of this class directly.
odemodeling::OdeModelFit
-> OdeModelMCMC
cmdstan_diagnostics
Output of the diagnose
program of 'CmdStan'.
cmdstan_summary
Output of the stansummary
program of 'CmdStan'.
odemodeling::OdeModelFit$cmdstan_seed()
odemodeling::OdeModelFit$cmdstan_version()
odemodeling::OdeModelFit$dim()
odemodeling::OdeModelFit$dim_odesol()
odemodeling::OdeModelFit$draws()
odemodeling::OdeModelFit$extract_odesol()
odemodeling::OdeModelFit$extract_odesol_df()
odemodeling::OdeModelFit$extract_odesol_df_dist()
odemodeling::OdeModelFit$extract_odesol_quantile()
odemodeling::OdeModelFit$extract_unflattened()
odemodeling::OdeModelFit$extract_y0()
odemodeling::OdeModelFit$get_t()
odemodeling::OdeModelFit$get_t0()
odemodeling::OdeModelFit$info()
odemodeling::OdeModelFit$loglik()
odemodeling::OdeModelFit$nchains()
odemodeling::OdeModelFit$ndraws()
odemodeling::OdeModelFit$niterations()
odemodeling::OdeModelFit$plot_odesol()
odemodeling::OdeModelFit$plot_odesol_dist()
odemodeling::OdeModelFit$summary()
odemodeling::OdeModelFit$time()
print_diagnostics()
Print the 'stdout' of 'CmdStan' diagnostics.
OdeModelMCMC$print_diagnostics()
print_summary()
Print the 'stdout' of 'CmdStan' summary.
OdeModelMCMC$print_summary()
new()
Create an OdeModelMCMC object.
OdeModelMCMC$new( model, t0, t, solver, data, cmdstanr_fit, cmdstan_diagnostics, cmdstan_summary )
model
An object of class OdeModel (will be deepcopied).
t0
Used initial time.
t
Used time points.
solver
Used solver. An object of class OdeSolver.
data
Given additional data.
cmdstanr_fit
A cmdstanr::CmdStanMCMC object.
cmdstan_diagnostics
Output of the diagnose
program of 'CmdStan'.
cmdstan_summary
Output of the stansummary
program of 'CmdStan'.
print()
Print information about the object.
OdeModelMCMC$print()
cmdstan_init()
Get used 'CmdStan' init argument.
OdeModelMCMC$cmdstan_init()
gqs()
Simulate ODE solutions (and other possible generated quantities
using) the model and fitted params. This If any
of the arguments are NULL
(default), they are replaced with ones saved
in the OdeModelFit object.
OdeModelMCMC$gqs( t0 = NULL, t = NULL, data = NULL, solver = NULL, fitted_params = NULL, ... )
t0
Initial time.
t
Vector of time points.
data
Additional data.
solver
ODE solver.
fitted_params
Will be passed as the fitted_params
argument
to the $generate_quantities()
method of the underlying
cmdstanr::CmdStanModel object. If this is NULL
(default),
parameter draws of the OdeModelFit object are used.
...
Arguments passed to the $generate_quantities()
method of
the underlying cmdstanr::CmdStanModel object.
An object of class OdeModelGQ.
reliability()
Study reliability of results by running standalone generated
quantities using more accurate ODE solver configurations.
See Timonen, J. et al. (2022) for description of the method.
Currently it is the user's responsibility to ensure that solvers
is a list of increasingly accurate solvers.
OdeModelMCMC$reliability( solvers, savedir = "results", basename = "odegq", recompute_loglik = TRUE, ... )
solvers
List of ODE solvers (should be the same solver as used
during MCMC, but with increasingly more accurate configurations).
See odesolvers_lists
for creating this.
savedir
Directory where results are saved. NOTE: it might be difficult to load the results if you move them to a different place afterwards, because the file paths get saved in the output. Improving the file handling should be a future improvement.
basename
Base name for saved files.
recompute_loglik
Should the log-likelihoods corresponding to solver configuration used during MCMC be recomputed?
...
Additional arguments passed to the $generate_quantities()
method of the underlying cmdstanr::CmdStanModel object.
A named list.
clone()
The objects of this class are cloneable with this method.
OdeModelMCMC$clone(deep = FALSE)
deep
Whether to make a deep clone.
Timonen, J. et al. (2022). An importance sampling approach for reliable and efficient inference in Bayesian ordinary differential equation models. arXiv.
For more useful methods, see the methods inherited from OdeModelFit.
Other model fit classes:
OdeModelFit
,
OdeModelGQ
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.