Description Usage Arguments Value See Also
View source: R/helper_functions.R
Reads in a .csv file to generate a table of parameter data for use in MCMC. The table should be have the following columns:
name: Name of the parameter (string/character)
value: arbritary numeric value that represents a typical value (this is not that important - it is just used for some upkeep functions)
lower_bound: numeric value for the lower allowable bound of the parameter (this can be -Inf)
upper_bound: numeric value for the upper allowable bound of the parameter (this can be Inf)
use_logistic: boolean value (1/0) indicating whether or not the parameter should be logistic transformed during optimisation, ensuring that the parameter search space is between the specified bounds
use_log: boolean value (1/0) indicating whether parameter optimisation should be on a log scale (note that this and use_logistic should NOT both be specified
step: initial step size for the MCMC random walk
fixed: boolean value indicating whether parameter should be fixed during MCMC/optimisation or not (1/0)
nuisance: boolean value indicating if parameter is a nuisance paramter (1/0)
lower_seed: numeric value for the lower bound of the random seed generation
upper_seed: numeric value for the upper bound of the random seed generation
prior_func: this should be a string that matches the name of a function that will be used as the prior function for MCMC. This function should be available in the current R environment, or an error will be thrown. See below.
prior_args: a vector of default arguments for the prior function. For example, this might contain the standard deviation or mean of a normal distribution. Most prior functions have a flag to indicate log probabilities, which should be set to true by this argument
log_proposal: boolean flag to indicate whether proposals in the MCMC function should be made on a log or linear scale (1 for log, 0 for linear). If in doubt, set this to 0.
1 | load_param_table(param_file)
|
param_file |
the full file location of the .csv file to be read |
a data frame containing the formatted data imported from the given .csv file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.