Skip to content

Commit c59b5b9

Browse files
committed
minor edits and regenerate Rd files
1 parent 11902bd commit c59b5b9

File tree

5 files changed

+51
-45
lines changed

5 files changed

+51
-45
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ URL: https://mc-stan.org/cmdstanr/, https://discourse.mc-stan.org
3232
BugReports: https://github.com/stan-dev/cmdstanr/issues
3333
Encoding: UTF-8
3434
LazyData: true
35-
RoxygenNote: 7.3.2
35+
RoxygenNote: 7.3.3
3636
Roxygen: list(markdown = TRUE, r6 = FALSE)
3737
SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan)
3838
Depends:

R/fit.R

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,11 +1812,13 @@ CmdStanMCMC$set("public", name = "num_chains", value = num_chains)
18121812
#'
18131813
#' @description A `CmdStanMLE` object is the fitted model object returned by the
18141814
#' [`$optimize()`][model-method-optimize] method of a [`CmdStanModel`] object.
1815-
#' This object will either contain a penalized maximum likelihood estimate
1816-
#' (MLE) or a maximum a posteriori estimate (MAP), depending on the value of
1817-
#' the `jacobian` argument when the model is fit (and whether the model has
1818-
#' constrained parameters). See [`$optimize()`][model-method-optimize] and the
1819-
#' CmdStan User's Guide for more details.
1815+
#' The name "MLE" (used for historical reasons) is a bit misleading since this
1816+
#' object will contain parameter estimates corresponding to either a mode in
1817+
#' the constrained parameter space _or_ the unconstrained parameter space,
1818+
#' depending on the value of the `jacobian` argument when the model is fit
1819+
#' (and whether the model has constrained parameters). See
1820+
#' [`$optimize()`][model-method-optimize] and the CmdStan User's Guide for
1821+
#' more details.
18201822
#'
18211823
#' @section Methods: `CmdStanMLE` objects have the following associated methods,
18221824
#' all of which have their own (linked) documentation pages.

R/model.R

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,18 +1447,18 @@ CmdStanModel$set("public", name = "sample_mpi", value = sample_mpi)
14471447
#' @family CmdStanModel methods
14481448
#'
14491449
#' @description The `$optimize()` method of a [`CmdStanModel`] object runs
1450-
#' Stan's optimizer to find a posterior mode. If the Jacobian adjustment
1451-
#' is not included (the default), the optimization returns parameter
1452-
#' values that correspond to a mode of the target in the constrained
1453-
#' space (if such mode exists). Thus this option is useful for any
1454-
#' optimization where we want to find the mode in the original
1455-
#' constrained parameter space. If the Jacobian adjustment is included,
1456-
#' the optimization returns parameter values that correspond to a mode
1457-
#' in the unconstrained space. This is useful, for example, if we want
1458-
#' to make a distributional approximation of the posterior at the mode
1459-
#' (see, Laplace sampling, as then Jacobian adjustment needs to be
1460-
#' included for correct results. If the model has only unconstrained
1461-
#' parameters, there is no effect from including the Jacobian. See the
1450+
#' Stan's optimizer to find a posterior mode. If the Jacobian adjustment is
1451+
#' not included (the default), the optimization returns parameter values that
1452+
#' correspond to a mode of the target in the constrained space (if such mode
1453+
#' exists). Thus this option is useful for any optimization where we want to
1454+
#' find the mode in the original constrained parameter space. If the Jacobian
1455+
#' adjustment is included, the optimization returns parameter values that
1456+
#' correspond to a mode in the unconstrained space. This is useful, for
1457+
#' example, if we want to make a distributional approximation of the posterior
1458+
#' at the mode (see, [Laplace sampling][model-method-laplace], for which the
1459+
#' Jacobian adjustment needs to be included for correct results). If the model
1460+
#' has only unconstrained parameters, there is no effect from including the
1461+
#' Jacobian. See the
14621462
#' [CmdStan User's Guide](https://mc-stan.org/docs/cmdstan-guide/index.html)
14631463
#' for more details.
14641464
#'
@@ -1481,13 +1481,12 @@ CmdStanModel$set("public", name = "sample_mpi", value = sample_mpi)
14811481
#' the CmdStan User's Guide. The default values can also be obtained by
14821482
#' running `cmdstanr_example(method="optimize")$metadata()`.
14831483
#' @param jacobian (logical) Whether or not to use the Jacobian adjustment for
1484-
#' constrained variables. For historical reasons, the default is `FALSE`, meaning optimization
1485-
#' yields the (regularized) maximum likelihood estimate. Setting it to `TRUE`
1486-
#' yields the maximum a posteriori estimate. See the
1487-
#' [Maximum Likelihood Estimation](https://mc-stan.org/docs/cmdstan-guide/maximum-likelihood-estimation.html)
1488-
#' section of the CmdStan User's Guide for more details.
1489-
#' For use later with [`$laplace()`][model-method-laplace] the `jacobian`
1490-
#' argument should typically be set to `TRUE`.
1484+
#' constrained variables. For historical reasons, the default is `FALSE`,
1485+
#' meaning optimization finds a mode of the target in the original constrained
1486+
#' parameter space. Setting it to `TRUE` finds a mode in the unconstrained
1487+
#' space. See the CmdStan User's Guide for more details. For use later with
1488+
#' [`$laplace()`][model-method-laplace] the `jacobian` argument should
1489+
#' typically be set to `TRUE`.
14911490
#' @param init_alpha (positive real) The initial step size parameter.
14921491
#' @param tol_obj (positive real) Convergence tolerance on changes in objective function value.
14931492
#' @param tol_rel_obj (positive real) Convergence tolerance on relative changes in objective function value.

man/CmdStanMLE.Rd

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/model-method-optimize.Rd

Lines changed: 18 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)