Calculates varcov matrix of an Apollo model
Calculates the Hessian, varcov matrix and s.e. of an Apollo model as defined buy its likelihood function and apollo_inputs list of settings. Performs automatic scaling for increased numeric stability.
apollo_varcov(apollo_beta, apollo_fixed, varcov_settings)
apollo_beta |
Named numeric vector. Names and values of parameters at which to calculate the covariance matrix. Values _must not be scaled_, and they must include any fixed parameter. |
apollo_fixed |
Character vector. Names of fixed parameters. |
varcov_settings |
List of settings defining the behaviour of this function. It must contain at least one of teh following: apollo_logLike, apollo_grad or apollo_inputs.
|
It calculates the Hessian, variance-covariance, and standard errors at apollo_beta
values of an
estimated model. At least one of the following settings must be provided (ordered by speed): apollo_grad
,
apollo_logLike
, or (apollo_probabilities
and apollo_inputs
). If more than one is provided,
then the priority is: apollo_inputs
, apollo_logLike
, (apollo_probabilities
and apollo_inputs
).
List with the following elements
hessian: Numerical matrix. Hessian of the model at parameter estimates (model$estimate
).
varcov: Numerical matrix. Variance-covariance matrix.
se: Named numerical vector. Standard errors of parameter estimates.
corrmat: Numerical matrix. Correlation between parameter estimates.
robvarcov: Numerical matrix. Robust variance-covariance matrix.
robse: Named numerical vector. Robust standard errors of parameter estimates.
robcorrmat: Numerical matrix. Robust correlation between parameter estimates.
apollo_beta: Named numerical vector. Parameter estimates (model$estimate
, not scaled).
methodUsed: Character. Name of method used to calculate the Hessian.
methodsAttempted: Character vector. Name of methods attempted to calculate the Hessian.
hessianScaling: Named numeric vector. Scales used on the paramaters to calculate the Hessian (non-fixed only).
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.