importMCMC | R Documentation |
Import Coleraine MCMC traces for likelihoods, parameters, spawning biomass, and recruitment.
importMCMC(dir, coda=FALSE, quiet=TRUE, pretty.labels=FALSE,
l.choose=NULL, p.choose=NULL)
dir |
directory containing the files ‘mcmclike.out’, ‘params.pst’, ‘spawbiom.pst’ and ‘recruits.pst’. |
coda |
whether data frames should be coerced to class |
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 |
p.choose |
vector of strings, indicating which parameters to
import, or |
A list containing:
L |
likelihoods |
P |
parameters |
B |
biomass by year |
R |
recruitment by year |
as data frames, or mcmc
objects if coda=TRUE
.
The functions ll
(package gdata) and head
are
recommended for browsing nested objects, e.g. ll(xmcmc)
,
ll(xmcmc$P)
, and head(xmcmc$P)
.
The plotMCMC package is recommended for plotting MCMC diagnostics and posteriors.
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.
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.
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.