Skip to contents

Set-up an antagonist sigmoid dose response model formula to define a non-linear model or multilevel non-linear model for ic50, hill, top, and, bottom for use in the sigmoid_model().

Usage

sigmoid_antagonist_formula(
  treatment_variable = "log_dose",
  treatment_units = "Log[Molar]",
  response_variable = "response",
  response_units = NULL,
  predictors = 1,
  ...
)

Arguments

treatment_variable

character variable representing the treatment.

treatment_units

character the units of the treatment. The default is log base 10 of the molar concentration.

response_variable

character variable representing the response to treatment.

response_units

character the units of the response.

predictors

character or expression of predictors of non-linear parameters. i.e. what perturbations/experimental differences should be modeled separately?

...

additional arguments to brms::brmsformula()

Value

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

See also

brms::brmsformula, which this function wraps. The resulting bpformula object can be passed into sigmoid_model().

Examples

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