apollo_varcov {apollo}  R Documentation 
Calculates variancecovariance matrix of an Apollo model
Description
Calculates the Hessian, variancecovariance matrix and standard errors of an Apollo model as defined by its likelihood function
and apollo_inputs
list of settings. Performs automatic scaling for increased numeric stability.
Usage
apollo_varcov(apollo_beta, apollo_fixed, varcov_settings)
Arguments
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
the following:

Details
It calculates the Hessian, variancecovariance, and standard errors at apollo_beta
values of an
estimated model. At least one of the following settings must be provided (ordered by speed of computation): apollo_grad
,
apollo_logLike
, or (apollo_probabilities
and apollo_inputs
). If more than one is provided,
then the priority is: apollo_grad
, apollo_logLike
, (apollo_probabilities
and apollo_inputs
).
Value
List with the following elements

apollo_beta
: Named numerical vector. Parameter estimates (model$estimate
, not scaled). 
corrmat
: Numerical matrix. Correlation between parameter estimates. 
hessian
: Numerical matrix. Hessian of the model at parameter estimates (model$estimate
). 
hessianScaling
: Named numeric vector. Scales used on the paramaters to calculate the Hessian (nonfixed only). 
methodsAttempted
: Character vector. Name of methods attempted to calculate the Hessian. 
methodUsed
: Character. Name of method used to calculate the Hessian. 
robcorrmat
: Numerical matrix. Robust correlation between parameter estimates. 
robse
: Named numerical vector. Robust standard errors of parameter estimates. 
robvarcov
: Numerical matrix. Robust variancecovariance matrix. 
se
: Named numerical vector. Standard errors of parameter estimates. 
varcov
: Numerical matrix. Variancecovariance matrix.