log_prior: Calculate the log prior

Description Usage Arguments Value

View source: R/mcmc_functions.R

Description

log_prior Right now this is set up to calculate the log prior for a set of parameters based on the normal distribtuion. TODO there should probably be some better way to set up and define the hyperparameters.

Usage

1
log_prior(params, ptable = MENDplus::MEND2013_params)

Arguments

params

a vector of parameters, the vector must include parameter names.

ptable

a MEND parameter table that will be updated with the values from params. MEND2013_params is used as the default paraemter table. However ptable may be set to any data frame that contains the following columns.

parameter

String character of the default MEND2013_params

description

String character describing the parameter.

units

String character of the parameter units.

value

Numeric values taken from the table 2 of the Wang et al. 2013

Value

the log prior for the sampled parameters.


kdorheim/MENDplus documentation built on Sept. 18, 2020, 6:18 p.m.