View source: R/model-sigmoid-run.R
| sigmoid_model | R Documentation |
Fits the sigmoid model. The functional form is
<response> ~ sigmoid(ac50, hill, top, bottom, <treatment>)
where
sigmoid = bottom + (top - bottom)/(1 + 10^((ac50 - <treatment>) * hill))
By default the observed data (and therefore should be columns in the input
data data.frame) are
treatment: log_dose, the log10 of the dose as a molar
concentration
response: response, with unspecified units
and the modeled parameters are
ac50: the dose where the response reaches half maximal activity
hill: the hill coefficient controlling the slope at the ac50,
by convention the slope of an agonist is positive
top: the response when Inf
bottom: the response when -Inf
To configure the model you can use the following helper functions for agonist models
sigmoid_agonist_formula(): define how the response relates to
the treatment and the parameters with ac50->ec50, and how any
covariates predict the parameters
sigmoid_agonist_prior(): define the prior for the model
parameters, with the slope constrained to be positive
sigmoid_agonist_init(): define initial values for the
model parameters to match the default sigmoid_agonist_prior()
the following helper functions for an antagonist model
sigmoid_antagonist_formula(): define how the response relates to
the treatment and the parameters with ac50->ic50, and how any
covariates predict the parameters
sigmoid_antagonist_prior(): define the prior for the
model parameters, with the slope being constrained be negative
sigmoid_antagonist_init(): define initial values for the
model parameters to match the default sigmoid_antagonist_prior()
sigmoid_model(
data,
formula = sigmoid_agonist_formula(),
prior = sigmoid_agonist_prior(),
init = sigmoid_agonist_init(),
iter = 8000,
control = list(adapt_delta = 0.99),
stanvar_function = sigmoid_stanvar(),
expose_functions = TRUE,
...
)
data |
|
formula |
|
prior |
|
init |
|
iter |
|
control |
a named |
stanvar_function |
stan code for the model. |
expose_functions |
|
... |
additional arguments passed to brms::brm |
bpfit object, which is a wrapper around a brms::brmsfit object.
## Not run:
BayesPharma::sigmoid_model(
data = data,
formula = BayesPharma::sigmoid_antagonist_formula(predictors = 0 + drug),
prior = BayesPharma::sigmoid_antagonist_prior(),
init = BayesPharma::sigmoid_antagonist_init())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.