| stan-classes | R Documentation |
The constructors for Stan back-ends and methods are exported to support
extensions to measr, for example converting other models to measrfit
objects. We do not expect or recommend calling these functions directly
unless you are converting objects, or creating new methods for measrfit
objects.
rstan()
cmdstanr()
mcmc()
optim()
variational()
pathfinder()
gqs()
There are two classes for estimation backends, which define the package that
should be used, or was used, to estimate a model. Both classes inherit from
measr::stanbackend.
The rstan() class indicates use of the {rstan} package.
cmdstanr() indicates use of the {cmdstanr} package.
The method classes define which estimation method should be used, or was
used, for a model. All method classes inherit from measr::stanmethod.
The mcmc() class indicates the use of Markov chain Monte Carlo via
rstan::sampling() when using {rstan} or the
$sample() method of the
CmdStanModel class when using {cmdstanr}.
The variational() class indicated the use of Stan's variational algorithm
for approximate posterior sampling via rstan::vb() when using {rstan} or
the $variational() method of the
CmdStanModel class when using {cmdstanr}.
The pathfinder() class indicates the use of pathfinder variational
inference algorithm via the $pathfinder() method
of the CmdStanModel. This method is only available
when using {cmdstanr}.
The optim() class indicates the use maximum-likelihood via
rstan::optimizing() when using {rstan} or the
$optimize() method of the
CmdStanModel class when using {cmdstanr}.
Finally, there is a gqs() class for use when a model has previously been
estimated and were are interested in calculating generated quantities (e.g.,
score(), loglik_array()).
The gqs() class indicates the use of rstan::gqs() when using {rstan}
and the $generate_quantities() method of
the CmdStanModel class when using {cmdstanr}.
An S7 object with the corresponding class.
rstan()
mcmc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.