View source: R/model-growth-formula.R
growth_richards_formula | R Documentation |
set-up a Richards growth model formula to for use in
growth_richards_model
and in the BayesPharma package. The functional
form is
response ~ richards_growth(K, K0, rate, lambda, nu, time)
The parameterization follows (Zwietering, 1990) and grofit:
K = carrying capacity, K = response(time = Inf). The grofit package calls this parameter A. The K parameter has the same units as the response. K0 = initial population size, K0 = response(time = 0). The grofit package assumes K0 = 0. The K0 parameter has the same units as the response. rate = maximum growth rate, rate = max[d(response)/d(time)]. The grofit package calls this mu. The rate parameter has the units of response/time. lambda = duration of the lag-phase, the time point at which the tangent through the growth curve when it achieves the maximum growth rate crosses the initial population size K0. (see Figure 2 in (Kahm et al., 2010)). The lambda parameter has the units of time. nu = growth asymmetry before and after the inflection point. The nu parameter is unitless.
See the vignettes(topic = "derive_growth_model", package = "BayesPharma")
for more details.
growth_richards_formula(
treatment_variable = "time",
treatment_units = "hours",
response_variable = "response",
response_units = NULL,
predictors = 1,
...
)
treatment_variable |
|
treatment_units |
|
response_variable |
|
response_units |
|
predictors |
Additional formula objects to specify predictors of non-linear parameters. i.e. what perturbations/experimental differences should be modeled separately? (Default: 1) should a random effect be taken into consideration? i.e. cell number, plate number, etc. |
... |
additional arguments to |
a bpformula
, which is a subclass of
brms::brmsformula()
and can be passed to
growth_richards_model()
.
Zwietering M. H., Jongenburger I., Rombouts F. M., van 't Riet K., (1990) Modeling of the Bacterial Growth Curve. Appl. Environ. Microbiol., 56(6), 1875-1881 https://doi.org/10.1128/aem.56.6.1875-1881.1990
Kahm, M., Hasenbrink, G., Lichtenberg-Fraté, H., Ludwig, J., & Kschischo, M. (2010). grofit: Fitting Biological Growth Curves with R. J. Stat. Softw., 33(7), 1–21. https://doi.org/10.18637/jss.v033.i07
brms::brmsformula()
, which this function wraps.
growth_richards_model()
into which the result of this
function can be passed.
## Not run:
# Data has a string column drug_id with drug identifiers
# Fit a separate model for each drug
BayesPharma::growth_richards_formula(predictors = 0 + drug_id)
# Data has a string column plate_id with plate identifiers
# Estimate the change in response for each plate relative to a global
# baseline.
BayesPharma::growth_richards_formula(predictors = plate_id)
# data has columns drug_id and plate_id
# fit a multilevel model where the drug effect depends on the plate
BayesPharma::growth_richards_formula(predictors = 0 + (drug_id|plate_id))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.