importProj {scape} | R Documentation |
Import Coleraine MCMC Projections
Description
Import Coleraine MCMC traces for spawning biomass and catch, projected into the near future.
Usage
importProj(dir, coda=FALSE, quiet=TRUE)
Arguments
dir |
directory containing the files ‘strategy.out’, ‘projspbm.pst’ and ‘procatch.pst’. |
coda |
whether data frames should be coerced to class |
quiet |
whether to report progress while parsing files in directory. |
Value
A list containing:
B |
biomass by catch policy and year |
Y |
catch by catch policy and year |
as lists of data frames, or mcmc
objects if coda=TRUE
.
Note
MCMC projections can be used to evaluate the short-term outcome of harvest policies (constant catch or constant harvest rate), given the uncertainty about parameter values and random future recruitment.
The functions ll
(package gdata) and head
are
recommended for browsing nested objects, e.g. ll(xproj)
,
ll(xproj$B)
, ll(xproj$B$"0.2")
, and
head(xproj$B$"0.2")
.
The plotMCMC package is recommended for plotting MCMC diagnostics and posteriors.
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.
xproj
was created using importProj
.
scape-package
gives an overview of the package.
Examples
path <- system.file("example/mcmc", package="scape")
proj <- importProj(path)