parse.parmtable: Reading a parameter table and making utility functions

View source: R/parse.parmtable.R

parse.parmtableR Documentation

Reading a parameter table and making utility functions

Description

This function is designed to simplify the workflow by allowing specification of parameters/priors in an external CSV file following certain conventions.

Usage

parse.parmtable(
  data,
  outfile = NULL,
  dpl = 3,
  testdir = NULL,
  qn = 0.75,
  tgphfmt = "png"
)

Arguments

data

in data, first col parm name, second definition

outfile

optional name for test table out

dpl

number of dps for reporting (TODO)

testdir

test directory. Settings this acts as a flag for action. TODO

qn

quantiles to report in table TODO

tgphfmt

test graph format (default 'png', otherwide 'pdf')

Details

Work in progress: need to add other distributions; testing functionality etc

The following distributions are handled:

  • "Normal" defined as N(mean,sd)

  • "Log-Normal" defined as LN(mu,sdlog)

  • "Beta" defined as B(a,b)

  • "Exponential" defined as E(rate)

TODO document & expand inputs below,

Value

list of functions for RV computations and associated names

Author(s)

Pete Dodd

Examples

tst <- parse.parmtable(data.frame(parm=c('blah','nla'),dist=c('LN(2,3)','N(2,3)')))
tst[[1]]$r(10)
tst[['blah']]$r(10)


petedodd/HEdtree documentation built on Dec. 5, 2022, 6:22 a.m.