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.
Value
An S7 object with the corresponding class.
Details
Back-end classes
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.
Method classes
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 viarstan::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 viarstan::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 viarstan::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()). Thegqs()class indicates the use ofrstan::gqs()when using{rstan}and the$generate_quantities()method of the CmdStanModel class when using{cmdstanr}.
