Description Usage Arguments Value
View source: R/mcmc_functions.R
make_logpost
Define the function that will calculate the log
posterior. The function returned by make_logpost
will be used in
the metrop
to conduct the mcmc.
TODO figure out a better way to document the inputs/
1 2 3 4 5 6 7 8 9 10 11 | make_logpost(
comp,
params,
t = seq(0, 1000, 1),
state = c(P = 10, M = 5, Q = 0.1, B = 2, D = 1, EP = 1e-05, EM = 1e-05, IC = 0, Tot =
18.10002),
carbon_pools_func = MENDplus::MEND2013_pools,
flux_func = MENDplus::MEND2013_fluxes,
ptable = MENDplus::MEND2013_params,
verbose = FALSE
)
|
comp |
the comparison data frame it must comain at least two columns,
|
params |
a named vector of the inital guess of the parameters that will be calibrated in the mcmc. |
t |
time vector that will be used to run the model. |
state |
the inital state variables |
carbon_pools_func |
the function that governs the relationship between the different carbon
pools, by default it is set to |
flux_func |
the function that governs fluxes, by default is it set to |
ptable |
A table of MEND parameter calues, by default is it set to
|
verbose |
a TRUE/FALSE indicator to run the function in verbose mode where messages are printed out, by default set to FALSE. |
a function that will return the log posterior.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.