Skip to contents

Set-up a sigmoid growth model formula to for use in growth_sigmoid_model(). The functional form is

response ~ growth_sigmoid(K, K0, rate, lambda, time)

The parameterization follows (Zwietering, 1990) and grofit:

K      = **carrying capacity**, `K = response(time = Inf)`. The
         \pkg{grofit} package calls this parameter `A`. `K` has the same
         units as the `response`.
K0     = **initial population size** `K0 = response(time = 0)`. The
         \pkg{grofit} package assumes `K0=0`. `K0` has the same units as
         the `response`.
rate   = **maximum growth rate** `rate = max[d(response)/d(time)]`. The
         \pkg{grofit} package calls this `mu`. `rate` 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)).

See the vignettes(topic = "derive_growth_model", package = "BayesPharma") for more details.

Usage

growth_sigmoid_formula(
  treatment_variable = "time",
  treatment_units = "hours",
  response_variable = "response",
  response_units = NULL,
  predictors = 1,
  ...
)

Arguments

treatment_variable

character variable representing time as a treatment

treatment_units

character the units of the time variable

response_variable

character variable representing the response to treatment

response_units

character the units of the response

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 brms::brmsformula()

Value

a bpformula, which is a subclass of brms::brmsformula and can be passed to growth_sigmoid_model().

References

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

See also

[brms::brmsformula()], which this function wraps.
[growth_sigmoid_model]()] into which the result of this
function can be passed. Related to [grofit::logistic]

Examples

if (FALSE) { # \dontrun{
  # Data has a string column drug_id with drug identifiers
  # Fit a separate model for each drug
  BayesPharma::growth_sigmoid_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_sigmoid_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_sigmoid_formula(predictors = 0 + (drug_id|plate_id))
} # }