write.admb.cov: Write a covariance matrix to the ADMB covariance file.

Description Usage Arguments Details Value Author(s)


Write a covariance matrix to the ADMB covariance file.


write.admb.cov(cov.user, model.path = getwd())



(Numeric matrix) A covariance matrix (in bounded space) to write to file. This matrix will be read in by ADMB and can be used in subsequent calculations.


The directory path to the folder containing the model.


The admodel.hes and admodel.cov files are written by ADMB during the optimization phase. The Hessian matrix contains the second derivatives evaluated at the maximum likelihood estimates. The inverse of the Hessian is the covariance matrix used to determine standard errors and in the MCMC algorithm. The admodel.hes file is written even if the matrix is not invertible (not positive definite).


The write functions return nothing, but have the side effect of changing ADMB files (including creating a backup of the original). The get functions return a list of the number of parameters (num.pars), the covariance or Hessian matrix in unbounded space (cov or hes), the hybrid bounded flag (hybrid_bounded_flag) which controls which bounding functions are used, and the scales, which are the second derivatives of the bounding functions evaluated at the MLE.


Cole Monnahan

colemonnahan/admbtools documentation built on May 13, 2019, 8:50 p.m.