metab_mle | R Documentation |
Uses maximum likelihood to fit a model to estimate GPP and ER from input data on DO, temperature, light, etc. Discharge is only used, if at all, to identify and exclude days with any negative discharge.
metab_mle(
specs = specs(mm_name("mle")),
data = mm_data(solar.time, DO.obs, DO.sat, depth, temp.water, light, discharge,
optional = "discharge"),
data_daily = mm_data(date, K600.daily, init.GPP.daily, init.Pmax, init.alpha,
init.ER.daily, init.ER20, init.K600.daily, optional = "all"),
info = NULL
)
specs |
a list of model specifications and parameters for a model.
Although this may be specified manually (it's just a list), it is easier
and safer to use |
data |
data.frame (not a tbl_df) of input data at the temporal
resolution of raw observations (unit-value). Columns must have the same
names, units, and format as the default. The solar.time column must also
have a timezone code ('tzone' attribute) of 'UTC'. See the
'Formatting |
data_daily |
data.frame containing inputs with a daily timestep. See the
'Formatting |
info |
any information, in any format, that you would like to store within the metab_model object |
A metab_mle object containing the fitted model. This object can be
inspected with the functions in the metab_model_interface
.
The code
column in get_fit(mm)
is defined in the Value
subsection of ?nlm
.
Other metab_model:
metab_Kmodel
,
metab_bayes
,
metab_night
,
metab_sim
dat <- data_metab('3','30')
# PRK
mm <- metab_mle(data=dat)
predict_metab(mm)
# PR with fixed K on two days
dat_daily <- data.frame(date=as.Date(c("2012-09-18","2012-09-20")), K600.daily=35)
metab_mle(data=dat, data_daily=dat_daily)
# PRK with day-specific inits on some days
dat_daily <- data.frame(date=as.Date("2012-09-19"),
init.GPP.daily=4, init.K600.daily=60)
metab_mle(data=dat, data_daily=dat_daily)
# Nonlinear GPP or ER equations
metab_mle(specs(mm_name('mle', GPP_fun='satlight')), data=dat)
metab_mle(specs(mm_name('mle', ER_fun='q10temp')), data=dat)
## Not run:
plot_DO_preds(predict_DO(mm))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.