View source: R/cost_likelihood_biomee.R
cost_likelihood_biomee | R Documentation |
Cost function for parameter calibration, which computes the log-likelihood for the biomee model fitting several target variables for a given set of parameters.
cost_likelihood_biomee(par, obs, drivers, targets)
par |
A vector containing parameter values for |
obs |
A nested data frame of observations, following the structure of |
drivers |
A nested data frame of driver data, for example |
targets |
A character vector indicating the target variables for which the
optimization will be done. This should be a subset of |
The cost function performs a BiomeE model run for the value of
par
given as argument. The likelihood is calculated assuming that the
predicted targets are independent, normally distributed and centered on the observations.
The optimization
should be run using BayesianTools
, so the likelihood is maximized.
The log-likelihood of the simulated targets by the biomee model versus the observed targets.
# Compute the likelihood for a set of
# BiomeE model parameter values
# and the example data
cost_likelihood_biomee(
par = c(3.5, 3.5, 1, 1, # model params
0.5), # err_GPP
obs = biomee_validation_2,
drivers = biomee_gs_leuning_drivers,
targets = c("GPP")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.