Description Usage Arguments Value See Also
View source: R/checking_functions.R
Takes the table of parameters to be used for model calculation and MCMC fitting, and returns a string error if any of the inputs are invalid. The table should have the following column names:
name: Name of the parameter, string or 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 (1/0) indicating whether parameter should be fixed during MCMC/optimisation or not
nuisance: boolean value (1/0) indicating if parameter is a nuisance parameter
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 | param_check(param_table)
|
param_table |
a data frame or matrix containing the parameters and corresponding meta-data. |
returns a string containing an error message, or NULL if no error
mcmc_param_check
, prior
, prior_wrapper
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.