read_pars: Read in parameters from an AD Model Builder run

Description Usage Arguments Details Value Warnings See Also

Description

Reads coefficients, standard errors, log-likelihoods, maximum gradients, correlation and variance-covariance matrices from AD Model Builder output files

Usage

1
2
3
4
5
6
read_pars(fn, drop_phase = TRUE, covfn = "admodel.cov",
  warn_nonstd_rep = TRUE)

read_psv(fn, names = NULL)

read_rep(fn, names = NULL, warn_nonstd_rep = TRUE)

Arguments

fn

(character) Base name of AD Model Builder

drop_phase

(logical) drop negative-phase (fixed) parameters from results?

covfn

(character) file name for covariance matrix information

warn_nonstd_rep

warn if report file is in nonstandard format?

names

(character) Names of variables

Details

Given the output from an ADMB run on FOO.tpl, read_pars reads the files FOO.par (parameters, log-likelihood, max gradient); FOO.std (standard deviations); FOO.cor (correlations); FOO.rep (report variables); admodel.hes for hessian; and admodel.cov for covariance matrix. read_psv reads the output of MCMC runs.

read_rep (called by read_admb to read the .rep file) first checks if the report file is in a standard format: first line starts with a comment character (#); thereafter, each block starts with a single commented line containing the name of the parameter (possibly ending with a colon), followed by a block of all-numeric lines, which are read as a single vector. If the report file is in a standard format, the values are added to the end of the coefficients list. Otherwise, the numeric values from the report file are included in the results as a single, concantenated numeric vector.

Value

List containing the following elements

Warnings

See Also

write_pin, write_dat


R2admb documentation built on March 26, 2020, 7:39 p.m.