ode_model | R Documentation |
Generate model given the declarations of variables,
parameters, functions etc. The arguments odefun_vars
,
loglik_vars
and other_vars
must be lists whose elements must have one
of the following three types:
StanDeclaration - can be created using stan_var()
,
stan_vector()
, stan_array()
etc.
StanParameter - can be created using stan_param()
StanTransformation - can be created using stan_transform()
These will go to different blocks of the 'Stan' model code so that
StanDeclarations go to data
StanParameters go to parameters
StanTransformations with origin "data"
go to
transformed data
StanTransformations with origin "parameters"
go to
transformed parameters
StanTransformations with origin "model"
go to
generated quantities
ode_model(
N,
odefun_vars = list(),
odefun_body = "",
odefun_init = NULL,
loglik_vars = list(),
loglik_body = "",
other_vars = list(),
verbose = FALSE,
compile = TRUE,
sig_figs = 18
)
N |
A StanDimension variable describing the number of time points. |
odefun_vars |
Data and parameters needed by the ODE function. Must be a list of StanDeclaration, StanParameter, or StanTransformation objects. These will be defined in Stan model code blocks |
odefun_body |
ODE function body (Stan code string). |
odefun_init |
Initial value for ODE system at t0. Has to be a StanVector, or alternatively a StanParameter or a StanTransformation with StanVector base declaration. |
loglik_vars |
Data and parameters needed by the log likelihood function. |
loglik_body |
Log likelihood function body (Stan code string). |
other_vars |
Other variables. |
verbose |
Should this print more information? |
compile |
Should the model be compiled? |
sig_figs |
Number of significant figures to use in all 'CmdStan' calls. |
An object of class OdeModel.
Other model constructor functions:
example_ode_model()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.