mm_name | R Documentation |
A model_name
concisely specifies the structure of a metabolism model.
From a model_name
, an appropriate set of model specifications
(parameters and runtime options) can be generated with specs
.
From a complete specs
list, a metabolism model can be run with
metab
.
mm_name(
type = c("mle", "bayes", "night", "Kmodel", "sim"),
pool_K600 = c("none", "normal", "normal_sdzero", "normal_sdfixed", "linear",
"linear_sdzero", "linear_sdfixed", "binned", "binned_sdzero", "binned_sdfixed",
"complete"),
err_obs_iid = c(TRUE, FALSE),
err_proc_acor = c(FALSE, TRUE),
err_proc_iid = c(FALSE, TRUE),
err_proc_GPP = c(FALSE, TRUE),
ode_method = c("trapezoid", "euler", "rk2", "lsoda", "lsode", "lsodes", "lsodar",
"vode", "daspk", "rk4", "ode23", "ode45", "radau", "bdf", "bdf_d", "adams",
"impAdams", "impAdams_d", "Euler", "pairmeans", "NA"),
GPP_fun = c("linlight", "satlight", "satlightq10temp", "NA"),
ER_fun = c("constant", "q10temp", "NA"),
deficit_src = c("DO_mod", "DO_obs", "DO_obs_filter", "NA"),
engine = c("stan", "nlm", "lm", "mean", "loess", "rnorm"),
check_validity = TRUE
)
type |
character. The model type. Options:
|
pool_K600 |
character. [How] should the model pool information among days to get more consistent daily estimates for K600? Options (see Details for more):
|
err_obs_iid |
logical. Should IID observation error be included? If not, the model will be fit to the differences in successive DO measurements, rather than to the DO measurements themselves. |
err_proc_acor |
logical. Should autocorrelated process error (with the autocorrelation term phi fitted) be included? |
err_proc_iid |
logical. Should IID process error be included? |
err_proc_GPP |
logical. Should IID process error in GPP be included? This kind of error occurs only during the day and is used to adjust GPP before passing that adjusted GPP into the dDO/dt equation. The GPP_inst variable is the corrected GPP, and a new variable, GPP_inst_partial, contains the pre-adjustment GPP estimates |
ode_method |
character. The method to use in solving the ordinary differential equation for DO. Options:
|
GPP_fun |
character. Function dictating how gross primary productivity (GPP) varies within each day. Options:
|
ER_fun |
character. Function dictating how ecosystem respiration (ER) varies within each day. Options:
|
deficit_src |
character. From what DO estimate (observed or modeled) should the DO deficit be computed? Options:
|
engine |
character. With which function or software should the model fitting be done?
|
check_validity |
logical. if TRUE, this function checks the resulting
name against |
While the Usage
shows all valid values for each argument, not all
argument combinations are valid; the combination will also be checked if
check_validity==TRUE
. For arguments not explicitly specified, defaults
depend on the value of type
: any argument that is not explicitly
supplied (besides type
and check_validity
) will default to the
values indicated by mm_parse_name(mm_valid_names(type)[1])
.
Here are the essential model lines (in Stan language) that distinguish the K pooling options.
pool_K600 | Model code |
none | K600_daily ~ normal(K600_daily_mu, K600_daily_sigma)
|
normal | K600_daily ~ normal(K600_daily_mu,
K600_daily_sigma) |
K600_daily_mu ~ normal(K600_daily_mu_mu,
K600_daily_mu_sigma) |
|
K600_daily_sigma ~
gamma(K600_daily_sigma_shape, K600_daily_sigma_rate) |
|
linear | K600_daily_pred <- K600_daily_beta[1] +
K600_daily_beta[2] * discharge_daily |
K600_daily ~
normal(K600_daily_pred, K600_daily_sigma) |
|
K600_daily_beta ~
normal(K600_daily_beta_mu, K600_daily_beta_sigma) |
|
K600_daily_sigma ~ gamma(K600_daily_sigma_shape,
K600_daily_sigma_rate) |
|
binned | K600_daily_pred <- K600_daily_beta[Q_bin_daily] |
K600_daily ~ normal(K600_daily_pred, K600_daily_sigma) |
|
K600_daily_beta ~ normal(K600_daily_beta_mu, K600_daily_beta_sigma) |
|
K600_daily_sigma ~ gamma(K600_daily_sigma_shape,
K600_daily_sigma_rate) |
|
complete | [This option refers to complete pooling via
metab_Kmodel in conjunction with preceding |
estimates of K
(e.g., by metab_mle or metab_night ) and subsequent estimates of
GPP and ER |
|
(e.g., by metab_mle with daily K600 values
specified)] |
|
The converse of this function is mm_parse_name
.
mm_name('mle')
mm_name('mle', GPP_fun='satlight', ER_fun='q10temp')
mm_name('night')
mm_name('sim', err_proc_acor=TRUE)
mm_name('bayes', pool_K600='binned')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.