scape (version 2.3-2)

importMCMC: Import Coleraine MCMC Results

Description

Import Coleraine MCMC traces for likelihoods, parameters, spawning biomass, and recruitment.

Usage

importMCMC(dir, coda=FALSE, quiet=TRUE, pretty.labels=FALSE,
           l.choose=NULL, p.choose=NULL)

Arguments

dir

directory containing the files mcmclike.out, params.pst, spawbiom.pst and recruits.pst.

coda

whether data frames should be coerced to class mcmc using the coda package.

quiet

whether to report progress while parsing files in directory.

pretty.labels

whether likelihood and parameter columns should be renamed

l.choose

vector of strings, indicating which likelihood components to import, or NULL to import all.

p.choose

vector of strings, indicating which parameters to import, or NULL to import all.

Value

A list containing:

L

likelihoods

P

parameters

B

biomass by year

R

recruitment by year

as data frames, or mcmc objects if coda=TRUE.

References

Hilborn, R., Maunder, M., Parma, A., Ernst, B., Payne, J., and Starr, P. (2003) Coleraine: A generalized age-structured stock assessment model. User's manual version 2.0. University of Washington Report SAFS-UW-0116.

See Also

read.table, readLines, and scan import any data.

importMCMC and importProj import Coleraine MCMC results.

xmcmc was created using importMCMC.

scape-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
path <- system.file("example/mcmc", package="scape")
mcmc <- importMCMC(path)  # or rename and select particular elements:
mcmc <- importMCMC(path, pretty.labels=TRUE,
                   l.choose=c("CAc","CAs","Survey","Prior","Total"),
                   p.choose=c("R0","Rinit","uinit","cSleft","cSfull",
                              "sSleft","sSfull","logq"))
# }

Run the code above in your browser using DataCamp Workspace