Description Usage Arguments Details Value Author(s)
Formula interface for fitting dose-response curves with rstan for binary responses
1 2 | standrm_binary(formula, data, fct, curveid = NULL, random = NULL,
priors = standrc_priors(), ...)
|
formula |
A two-sided formula with a binary response (a TRUE/FALSE or 1/0 vector) and dose covariate names |
data |
A dataframe containing the variables in the model |
fct |
A drc model function. |
curveid |
A two-sided formula with parameter names (b + c + d) on the left and a factor name on the right hand side, defining several clusters, modelled as fixed effects |
random |
A two-sided formula with parameter names (b + c + d) on the left and a factor name on the right hand side, defining several clusters, modelled as random effects |
priors |
A list with prior definitions, see |
... |
Additional arguments passed to function stan in ackage rstan |
The binary response is assumed to be Bernoulli distributed. The parameterization of the drc model functions is changed, modelling the slope and the asymmetry parameter on a logarithmic scale and allowing the lower and upper asymptotes to swap parameters. When not fixed, the asymptotes are modelled on the logit scale assuming normal priors, also adding random effects on the logit scale; samples from the posterior of the asymptotes and predictions are obtained on the probability scale. There might be a problem with three-parameter functions, fixing a specific asymptote by the fixed argument in a more complex model might be a better solution. Random effect parameters can be specified even when the fixed effects counterpart is fixed at a specific value, but might result in convergence problems as asymptote parameters are fixed on the probability scale.
stan_dat |
rstan compatible list containing the data |
model |
A character vector containing the stan model |
stan |
S4 output of rstan containing the samples from the posterior distributions |
pars |
Character vector with fixed effects parameter names |
random |
Character vector with random effects parameter names |
Daniel Gerhard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.