runTCSAM2015: Function to run TCSAM2015.

Description Usage Arguments Details Value

View source: R/runTCSAM2015.R

Description

This function runs a TCSAM2015 model once.

Usage

1
2
3
4
5
runTCSAM2015(os = "osx", path = ".", model = "tcsam2015",
  path2model = "", configFile = "", pin = FALSE, minPhase = 1,
  maxPhase = NULL, hess = FALSE, mcmc = FALSE, mc.N = 1e+06,
  mc.save = 1000, mc.scale = 1000, jitter = FALSE, jit.seed = NULL,
  calcOFL = FALSE, plotResults = hess, cleanup = TRUE)

Arguments

os

- 'win' or 'mac' or 'osx'

path

- path for model output

model

- TCSAM2013 model executable name

path2model

- path to model executable

configFile

- filename (including path) to model configuration file

pin

- T/F to use a pin file

minPhase

- phase to start minimization (or NULL)

maxPhase

- final minimization phase (or NULL)

hess

- T/F to compute hessian (and .std file)

mcmc

- T/F to run mcmc

mc.N

- number of mcmc iterations to do

mc.save

- number of iterations to skip when saving mcmc calculations

mc.scale

- number of iterations to adjust scale for mcmc calculations

jitter

- T/F to jitter parameters

jit.seed

- seed for random number generator (or NULL)

calcOFL

- flag (T/F) to perform OFL calculations

plotResults

- T/F to plot results using plotTCSAM2015I(...)

cleanup

- flag (T/F) to clean up unnecessary files

Details

This function creates a shell script ('./tmp.sh') in the working directory and uses it to run a version of the TCSAM2015 model.
Initial model parameters can be jittered based on the system clock time as a jit.seed to the random number generator. The jit.seed and final objective function value are saved for each model run in a csv file (the value of out.csv).

If the path associated with configFile is a relative one, it should be relative to the path variable. If showPlot=TRUE, the report file, prs file, and std files are read in and the associated objects are saved to 'ModelResults.RData' as repObj, prsObj, and stdObj, respectively.

Value

- dataframe of class 'tcam2015.par', with 2 columns (name, value) with jitter jit.seed (if jittered) and par file info, or NULL if par file does not exist.


wStockhausen/rTCSAM2015 documentation built on May 3, 2019, 7:14 p.m.