summaryLaplace | R Documentation |
Process the results of the 'findMLE' method of a nimble Laplace or AGHQ approximation into a more useful format.
summaryLaplace(
laplace,
MLEoutput,
originalScale = TRUE,
randomEffectsStdError = FALSE,
jointCovariance = FALSE
)
summaryAGHQ(
AGHQ,
MLEoutput,
originalScale = TRUE,
randomEffectsStdError = FALSE,
jointCovariance = FALSE
)
laplace |
The Laplace approximation object, typically the compiled one. This would be the result of compiling an object returned from 'buildLaplace'. |
MLEoutput |
The maximum likelihood estimate using Laplace or AGHQ,
returned from e.g. 'approx$findMLE(...)', where |
originalScale |
Should results be returned using the original parameterization in the model code (TRUE) or the potentially transformed parameterization used internally by the Laplace approximation (FALSE). Transformations are used for any parameters and/or random effects that have constrained ranges of valid values, so that in the transformed parameter space there are no constraints. |
randomEffectsStdError |
If TRUE, calculate the standard error of the estimates of random effects values. |
jointCovariance |
If TRUE, calculate the joint covariance matrix of the parameters and random effects together. If FALSE, calculate the covariance matrix of the parameters. |
AGHQ |
Same as |
The numbers obtained by this function can be obtained more directly by 'approx$summary(...)'. The added benefit of 'summaryLaplace' is to arrange the results into data frames (for parameters and random effects), with row names for the model nodes, and also adding row and column names to the covariance matrix.
A list with data frames 'params' and 'randomEffects', each with columns for 'estimate' and (possibly) 'se' (standard error) and row names for model nodes, a matrix 'vcov' with the covariance matrix with row and column names, and 'originalScale' with the input value of 'originalScale' so it is recorded for later use if wanted.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.