fit-method-mle | R Documentation |
The $mle()
method is only available for CmdStanMLE
objects. It returns the point estimate as a numeric vector with one element
per variable. The returned vector does not include lp__
, the total log
probability (target
) accumulated in the model block of the Stan program,
which is available via the $lp()
method and also
included in the $draws()
method.
For models with constrained parameters that are fit with jacobian=TRUE
,
the $mle()
method actually returns the maximum a posteriori (MAP)
estimate (posterior mode) rather than the MLE. See
$optimize()
and the CmdStan User's Guide for
more details.
mle(variables = NULL)
variables |
(character vector) The variables (parameters, transformed parameters, and generated quantities) to include. If NULL (the default) then all variables are included. |
A numeric vector. See Examples.
CmdStanMLE
## Not run:
fit <- cmdstanr_example("logistic", method = "optimize")
fit$mle("alpha")
fit$mle("beta")
fit$mle("beta[2]")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.