powered by
Cost function between observed and predicted pools
pdr_cost( params, time, m, n, m_prec, ap_prec, P, k, pool = "CH4", frac_P = frac_P_default(pool), frac_k = frac_k_default(pool), log_progress = NULL )
Returns a cost metric summarizing the difference between the predicted and observed m (total pool size) and AP (atom percent).
m
AP
Named list holding optimizer-assigned values for parameters
Vector of numeric time values; first should be zero
Observed total pool size, same length as time
Observed pool size of heavy isotope, same length as time
Instrument precision for pool size, expressed as a standard deviation
Instrument precision for atom percent, expressed as a standard deviation
production rate, unit pool size/unit time
first-order rate constant for consumption, 1/unit time
Name of pool; see pdr_fractionation
pdr_fractionation
Fractionation value for production; see pdr_fractionation
Fractionation value for consumption; see pdr_fractionation
An optional logging function
K.A. Morris & B. Bond-Lamberty
m <- c(10, 8, 6, 5, 4, 3) n <- c(1, 0.7, 0.6, 0.4, 0.3, 0.2) pdr_cost(params = list(P = 0.5, k = 0.3), time = 0:5, m, n, m_prec = 0.001, ap_prec = 0.01)
Run the code above in your browser using DataLab