runLaplace | R Documentation |
Use an approximation (compiled or uncompiled) returned from 'buildLaplace' or 'buildAGHQ' to find the maximum likelihood estimate and return it with random effects estimates and/or standard errors.
runLaplace(
laplace,
pStart,
method = "BFGS",
originalScale = TRUE,
randomEffectsStdError = TRUE,
jointCovariance = FALSE
)
runAGHQ(
AGHQ,
pStart,
method = "BFGS",
originalScale = TRUE,
randomEffectsStdError = TRUE,
jointCovariance = FALSE
)
laplace |
A (compiled or uncompiled) nimble laplace approximation object returned from 'buildLaplace' or 'buildAGHQ'. These return the same type of approximation algorithm object. 'buildLaplace' is simply 'buildAGHQ' with 'nQuad=1'. |
pStart |
Initial values for parameters to begin optimization search for the maximum likelihood estimates. If omitted, the values currently in the (compiled or uncompiled) model object will be used. |
method |
Optimization method for outer optimization. See |
originalScale |
If |
randomEffectsStdError |
If |
jointCovariance |
If |
AGHQ |
Same as |
Adaptive Gauss-Hermite quadrature is a generalization of Laplace
approximation. runLaplace
simply calles runAGHQ
and provides a
convenient name.
These functions manage the steps of calling the 'findMLE' method to obtain the maximum likelihood estimate of the parameters and then the 'summaryLaplace' function to obtain standard errors, (optionally) random effects estimates (conditional modes), their standard errors, and the full parameter-random effects covariance matrix.
Note that for 'nQuad > 1' (see buildAGHQ
), i.e., AGHQ with
higher order than Laplace approximation, maximum likelihood estimation is
available only if all random effects integrations are univariate. With
multivariate random effects integrations, one can use 'nQuad > 1' only to
calculate marginal log likelihoods at given parameter values. This is useful
for checking the accuracy of the log likelihood at the MLE obtained for
Laplace approximation ('nQuad == 1'). 'nQuad' can be changed using the
'updateSettings' method of the approximation object.
See summaryLaplace
, which is called for the summary components.
A list with elements MLE
and summary
.
MLE
is the result of the findMLE
method, which contains the
parameter estimates and Hessian matrix. This is considered raw output, and
one should normally use instead the contents of summary
. (For example
not that the Hessian matrix in MLE
may not correspond to the same
scale as the parameter estimates if a transformation was used to operate in
an unconstrained parameter space.)
summary
is the result of summaryLaplace
(or equivalently
summaryAGHQ
), which contains parameter estimates and standard errors,
and optionally other requested components. All results in this object will be
on the same scale (parameterization), either original or transformed, as
requested.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.