fit_tktd | R Documentation |
fit_tktd(x, data, ...)
## S4 method for signature 'LemnaSetac,missing'
fit_tktd(x, data, par, log_scale = TRUE, verbose = FALSE, ...)
## S4 method for signature 'LemnaSchmitt,missing'
fit_tktd(x, data, par, log_scale = TRUE, verbose = FALSE, ...)
## S4 method for signature 'Magma,missing'
fit_tktd(x, data, par, log_scale = TRUE, verbose = FALSE, ...)
x |
a scenario or a list of caliset objects |
data |
toxicological trial data to fit TK/TD parameters to: required if
|
... |
additional arguments passed through to |
par |
named vector, of parameters to fit and their starting values |
log_scale |
logical, if |
verbose |
logical, if |
The function can be used in three basic ways: Fit parameters of
a single scenario to a data set
a list of calisets
a list of calisets in a chain of fit
functions
For option 1), scenario and data are supplied separately. In this case,
supported types of argument data
are data.frame
s and tox_data objects.
Any data.frame
must have a format that is compatible with the tox_data()
function.
In option 2), all conditions are fully described by a list of calibration sets. The user is responsible to set up all caliset objects to their needs.
Option
3) is for convenience purposes and allows the chaining of fit functions.
The latter alternative accepts the return value of e.g. fit_growth()
as argument x
and the fitted parameter values are applied to all
calibration sets in argument data
.
a list
fit_tktd(x = LemnaSetac, data = missing)
: Fit TK/TD parameters of Lemna_SETAC scenarios
fit_tktd(x = LemnaSchmitt, data = missing)
: Fit TK/TD parameters of Lemna_Schmitt scenarios
fit_tktd(x = Magma, data = missing)
: Fit TK/TD parameters of Magma scenarios
# Use experimental data from control trial ('T0') to fit growth rate
ctrl <- schmitt2013[schmitt2013$trial == "T0" ,]
# Set up a scenario, provide dummy parameter values where necessary
sc <- Lemna_Schmitt() %>%
set_init(c(BM=0.0012)) %>%
set_param(c(EC50=1, b=1, P_up=1))
# Run fitting routine
fit_growth(sc, data=ctrl, verbose=TRUE)
# Use fitted growth parameter to adapt scenario
sc2 <- sc %>% set_param(c(k_phot_max=0.43925))
# Use experimental ecotox data for various concentrations of 'metsulfuron-methyl'
trials <- schmitt2013[schmitt2013$trial != "T0" ,]
# Fit remaining TK/TD parameters
fit_tktd(sc2, data=trials, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.