bayesnec
There are a range of models available in bayesnec and
the working bnec function supports individual model
fitting, as well as multi-model fitting with Bayesian model
averaging.
The argument model in a bayesnecformula may
be a character vector of model names or a named list of equation
formulas returned by models() (see ?models for
more details). If a recognised model name is provided, a single model of
the specified type is fit, and bnec returns a model object
of class bayesnecfit. If a vector or list of two or more of
the available models is supplied, bnec returns a model
object of class bayesmanecfit containing Bayesian model
averaged predictions for the supplied models, providing they were
successfully fitted.
Model averaging is achieved through a weighted sample of each fitted
model’s posterior predictions, with weights derived using the
loo_model_weights function from loo (Vehtari et al. 2026, 2017). Individual
brms model fits can be extracted from the
mod_fits element and can be examined individually.
The model may also be one of "all", meaning
all of the available models will be fit; "ecx" meaning only
models excluding the
step parameter will be fit; "nec" meaning only models with
a specific
step parameter will be fit; "bot_free" meaning only models
without a "bot" parameter (without a bottom plateau) will
be fit; "zero_bounded" are models that are bounded to be
zero; or "decline" excludes all hormesis models, i.e., only
allows a strict decline in response across the whole predictor range, or
no change, for the constant equation ecxflat (see below
Parameter definitions). There are a range of other
pre-defined model groups available. The full list of currently
implemented model groups can be seen using:
library(bayesnec)
models()
#> $nec
#> [1] "nec3param" "nec4param" "nechorme" "nechorme4" "necsigm" "neclin"
#> [7] "neclinhorme" "nechormepwr" "nechorme4pwr" "nechormepwr01"
#>
#> $ecx
#> [1] "ecx4param" "ecxlin" "ecxexp" "ecxsigm" "ecxwb1" "ecxwb2" "ecxwb1p3"
#> [8] "ecxwb2p3" "ecxll5" "ecxll4" "ecxll3" "ecxhormebc4" "ecxhormebc5" "ecxflat"
#>
#> $all
#> [1] "nec3param" "nec4param" "nechorme" "nechorme4" "necsigm" "neclin"
#> [7] "neclinhorme" "nechormepwr" "nechorme4pwr" "nechormepwr01" "ecxlin" "ecxexp"
#> [13] "ecxsigm" "ecx4param" "ecxwb1" "ecxwb2" "ecxwb1p3" "ecxwb2p3"
#> [19] "ecxll5" "ecxll4" "ecxll3" "ecxhormebc4" "ecxhormebc5" "ecxflat"
#>
#> $bot_free
#> [1] "nec3param" "nechorme" "necsigm" "neclin" "neclinhorme" "nechormepwr"
#> [7] "ecxlin" "ecxexp" "ecxsigm" "ecxwb1p3" "ecxwb2p3" "ecxll3"
#> [13] "ecxhormebc4" "nechormepwr01"
#>
#> $zero_bounded
#> [1] "nec3param" "nechorme" "necsigm" "nechormepwr" "nechormepwr01" "ecxexp"
#> [7] "ecxsigm" "ecxwb1p3" "ecxwb2p3" "ecxll3" "ecxhormebc4"
#>
#> $decline
#> [1] "nec3param" "nec4param" "neclin" "ecxlin" "ecxexp" "ecxsigm" "ecx4param" "ecxwb1" "ecxwb2"
#> [10] "ecxwb1p3" "ecxwb2p3" "ecxll5" "ecxll4" "ecxll3" "ecxflat"
#>
#> $hormesis
#> [1] "nechorme" "nechorme4" "neclinhorme" "nechormepwr" "nechorme4pwr" "nechormepwr01" "ecxhormebc4"
#> [8] "ecxhormebc5"A design with few distinct predictor concentrations may not support
equations with four or five curve parameters.
models(max_pars = 3) lists all equations with no more than
three curve parameters. The same limit can be combined with a group, for
example models("decline", max_pars = 3), and the returned
list can be passed directly to the model argument of
crf(), as in
crf(x, models("decline", max_pars = 3)).
Where possible we have aimed for consistency in the interpretable meaning of the individual parameters across models. Across the currently implemented model set, models contain from one (the constant equation ecxflat) or two (basic linear or exponential decay, see ecxlin or ecxexp) to five possible parameters (nechorme4), including:
, usually interpretable as either the y-intercept or the upper plateau representing the mean concentration of the response at zero concentration;
, the No-Effect-Concentration value (the x concentration value where the breakpoint in the regression is estimated at, see Model types for NEC and ECx estimation and (Fox 2010) for more details on parameter based NEC estimation);
, generally the exponential decay rate of response, either from 0 concentration or from the estimated value, with the exception of the neclinhorme model where it represents a linear decay from because slope () is required for the linear increase;
, representing the lower plateau for the response at infinite concentration;
, the linear decay rate in the models neclin and ecxlin, or the rate of the initial increase in the hormesis models (linear in nechorme, nechorme4, neclinhorme, ecxhormebc4 and ecxhormebc5, a power of concentration in nechormepwr and nechorme4pwr, where sets the exponent, and logistic in nechormepwr01);
, notionally the 50% effect concentration but may be influenced by scaling and should therefore not be strictly interpreted, and
, the exponent in the ecxsigm and necsigm models.
A scaling exponent exclusive to model ecxll5.
In addition to the model parameters, all nec-containing models have a step function used to define the breakpoint in the regression, which can be defined as
In principle all models provide an estimate for “no-effect” toxicity
concentration. For the monotone threshold equations,
nec3param, nec4param,
neclin and necsigm, the NEC is
estimated directly as the parameter
,
the concentration up to which the response stays at its control level,
as per Fox (2010). Model strings with
ecx as a prefix are continuous curve models with no
threshold, typically used for extracting ECx values from
concentration-response data. In this instance, the NEC reported is the
No-Significant-Effect-Concentration (NSEC, see
details in Fisher and Fox 2023), defined as the concentration at
which the predicted response falls below a lower quantile of the
posterior distribution of the control response, which is the predicted
mean at the lowest concentration in the supplied predictor (i.e., the
response value is significantly lower than that expected in the case of
no exposure). The quantile is set by the sig_val argument.
Its default value of 0.01 corresponds to an alpha value (Type-I error
rate) of 0.01 for a one-sided test of significance. The NSEC concept has
been recently explored using simulation studies and case study examples,
and when combined with the NEC estimates of threshold models within a
model‐ averaging approach, can yield robust estimates of N(S)EC and of
their uncertainty within a single analysis framework (Fisher, Fox, et al. 2024). Both NEC and NSEC
can be calculated from fitted models using the functions
nec() and nsec(). The significance level used
can be adjusted from the default value using amend().
The six hormesis threshold equations, nechorme,
nechorme4, neclinhorme,
nechormepwr, nechorme4pwr and
nechormepwr01, also estimate
,
but in these equations it is the concentration at which the decline term
starts. Where stimulation is fitted, the response at
is above the control, and where the slope of the stimulation term
exceeds the initial rate of decline the curve continues to rise beyond
it. For these equations nec() returns the NSEC instead: the
concentration at which the fitted curve, after any rise, falls below the
lower sig_val quantile of the fitted control. The
parameter remains available through curve_params(), where
it describes the shape of the response. This use of the NSEC extends the
method of Fisher and Fox (2023) from
monotone to hormetic curves. When a model set combines sampled NEC
estimates from monotone threshold equations with NSEC estimates from
smooth or hormesis threshold equations, its model-averaged estimate is
labelled N(S)EC (Fisher, Fox, et al.
2024).
ECx estimates can be equally obtained from both
"nec" and "ecx" models.
ECx estimates will usually be lower (more
conservative) for "ecx" models fitted to the same data as
"nec" models (see the Comparisons
and exceedance probabilities article for an example). However, we
recommend using "all" models where ECx
estimation is required because "nec" models can fit some
datasets better than "ecx" models and the model averaging
approach will place the greatest weight for the outcome that best fits
the supplied data. This approach will yield ECx
estimates that are the most representative of the underlying
relationship in the dataset.
Every ECx is measured from the control—the
predicted mean at the lowest concentration in the supplied predictor,
taken per posterior draw—and the type argument names what
the percentage is measured towards. For
type = "absolute" (the default) the target is 0. For
type = "relative" it is the equation’s theoretical
asymptote: the bot parameter where the equation has one,
and 0 otherwise; it is refused where the equation has no
bot and the family is unbounded below, because there is
then no finite denominator. For type = "range" it is the
lowest response the curve predicts over the predictor range. For
type = "direct", ecx_val is a response value
rather than a percentage and the concentration at which the curve
reaches it is returned.
Measuring from the control is what makes an ECx
well defined for a hormesis model—these allow an initial increase in the
response (see Mattson 2008) and include
models with the character string horme in their name. The
target lies below the control and the rising limb lies above it, so the
curve crosses the target exactly once. The same control reference
defines the NSEC of a hormesis equation.
Models that have an exponential decay (most models with parameter
)
with no
parameter are 0-bounded, because they cannot generate predictions of
negative response values, and are therefore not suitable for any family
modelled using a "logit" or "log" link.
Conversely, models with a linear decay (containing the string
lin in their name) are not suitable for modelling
families that are 0-bounded (Gamma, Poisson, Negative Binomial, Beta,
Binomial, Beta-Binomial) using an "identity" link. These
restrictions do not need to be controlled by the user, as a call to
bnec with model = "all" in the formula will
simply exclude inappropriate models, albeit with a message.
Fisher, Barneche, et al. (2024) also
describe the 0-bounded models as not suitable for the Gaussian family.
That restriction has been relaxed since publication, and
bnec fits these models to a Gaussian response. A Gaussian
mean is unconstrained, because the data enter the likelihood only
through the residual, so a curve that cannot fall below zero is still a
valid description of a response that can. This allows a lower asymptote
fixed at zero (representing, for example, complete inhibition of algal
growth rate) to be fitted to measurements that include negative values
without first replacing them. The Modelling
growth data and other potentially negative response values article
sets out the reasoning, and compares fitting the measurements as
recorded with altering them first, for example by replacing negative
values with zero.
An exclusion also applies to the 0, 1-bounded families (Binomial,
Beta and Beta-Binomial) on an "identity" link, and two of
the hormesis equations are excluded by it. nechormepwr
and nechorme4pwr include the hormesis term
,
which has no coefficient to shrink it. The term approaches 1 as
grows, at every concentration above zero, so for any
above zero there is an
at which the mean exceeds 1. That holds whatever the predictor range,
which is why the exclusion does not depend on the data supplied. The
other hormesis equations — nechorme,
nechorme4, nechormepwr01,
ecxhormebc4 and ecxhormebc5 — are
fitted on these families, because their increase prior to
is scaled by a parameter. The initial-value search starts them inside
the support: it draws from the priors, and accepts a draw only where the
whole initial curve falls within a band built from the replicated level
means and their spread, intersected with the support of the mean.
Where the predictor includes negative values,
ecxsigm, necsigm,
nechormepwr and nechorme4pwr, each of
which includes a fractional power, are also dropped. The predictor is
checked on the scale the model is fitted on, so they are dropped from a
fit using crf(log(x), ...) whenever a concentration is
below 1.
Figure 1 shows the shape of each equation whose name begins with
ecx.

Figure 1. The shape of each equation whose name begins
with ecx, drawn from chosen parameter values without
fitting, in one panel for each equation. The axes have no scale.
The ecxlin model is a basic linear decay model,
given by the equation:
with the respective brmsformula being
#> y ~ top - exp(slope) * x
#> top ~ 1
#> slope ~ 1
Because the model contains linear predictors it is not suitable for
0, 1-bounded data (i.e. Binomial and Beta families with an
"identity" link function). As the model includes a linear
decline with concentration, it is also not suitable for 0,
Inf bounded data (Gamma, Poisson, Negative Binomial with an
"identity" link).
The ecxexp model is a basic exponential decay model,
given by the equation:
with the respective brmsformula being
#> y ~ top * exp(-exp(beta) * x)
#> top ~ 1
#> beta ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function.
The ecxsigm model is a simple sigmoidal decay model,
given by the equation:
with the respective brmsformula being
#> y ~ top * exp(-exp(beta) * x^exp(d))
#> d ~ 1
#> top ~ 1
#> beta ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function.
The ecx4param model is a 4-parameter sigmoidal decay
model, given by the equation:
with the respective brmsformula being
#> y ~ top + (bot - top)/(1 + exp((ec50 - x) * exp(beta)))
#> bot ~ 1
#> ec50 ~ 1
#> top ~ 1
#> beta ~ 1
The ecxwb1 model is a 4-parameter sigmoidal decay
model which is a slight reformulation of the Weibull1 model of Ritz et al. (2015), given by the equation:
with the respective brmsformula being
#> y ~ bot + (top - bot) * exp(-exp(exp(beta) * (x - ec50)))
#> bot ~ 1
#> ec50 ~ 1
#> top ~ 1
#> beta ~ 1
The ecxwb1p3 model is a 3-parameter sigmoidal decay
model which is a slight reformulation of the Weibull1 model of Ritz et al. (2015), given by the equation:
with the respective brmsformula being
#> y ~ 0 + (top - 0) * exp(-exp(exp(beta) * (x - ec50)))
#> ec50 ~ 1
#> top ~ 1
#> beta ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function.
The ecxwb2 model is a 4-parameter sigmoidal decay
model which is a slight reformulation of the Weibull2 model of Ritz et al. (2015), given by the equation:
with the respective brmsformula being
#> y ~ bot + (top - bot) * (1 - exp(-exp(-exp(beta) * (x - ec50))))
#> bot ~ 1
#> ec50 ~ 1
#> top ~ 1
#> beta ~ 1
While very similar to the ecxwb1 (according to Ritz et al. 2015), fitted ecxwb1 and ecxwb2 models can differ slightly.
The ecxwb2p3 model is a 3-parameter sigmoidal decay
model, which is a slight reformulation of the Weibull2 model of Ritz et al. (2015), given by the equation:
with the respective brmsformula being
#> y ~ 0 + (top - 0) * (1 - exp(-exp(-exp(beta) * (x - ec50))))
#> ec50 ~ 1
#> top ~ 1
#> beta ~ 1
While very similar to the ecxwb1p3 (according to Ritz et al. 2015), fitted
ecxwb1p3 and ecxwb2p3 models can
differ slightly. The model is 0-bounded, thus not suitable for the use
of a "logit" or "log" link function.
The ecxll5 model is a 5-parameter sigmoidal
log-logistic decay model, which is a slight reformulation of the LL.5
model of Ritz et al. (2015), given by the
equation:
with the respective brmsformula being
#> y ~ bot + (top - bot)/(1 + exp(exp(beta) * (x - ec50)))^exp(f)
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> ec50 ~ 1
#> f ~ 1
The ecxll4 model is a 4-parameter sigmoidal
log-logistic decay model which is a slight reformulation of the LL.4
model of Ritz et al. (2015), given by the
equation:
with the respective brmsformula being
#> y ~ bot + (top - bot)/(1 + exp(exp(beta) * (x - ec50)))
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> ec50 ~ 1
The ecxll3 model is a 3-parameter sigmoidal
log-logistic decay model, which is a slight reformulation of the LL.3
model of Ritz et al. (2015), given by the
equation:
with the respective brmsformula being
#> y ~ 0 + (top - 0)/(1 + exp(exp(beta) * (x - ec50)))
#> top ~ 1
#> beta ~ 1
#> ec50 ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function.
The ecxflat model is the constant equation, given by
the equation:
with the respective brmsformula being
#> y ~ top + 0 * atan(x)
#> top ~ 1
The term 0 * atan(x) is zero at every concentration and
keeps the predictor in the fitted object. A fit of
ecxflat states that the response did not change over
the range tested. It has no step and no
parameter, so its no-effect estimate is an NSEC, and its curve reaches
no ECx target, so every ECx it
gives is reported as censored above the upper end of the prediction
range. It is suitable for every family.
The ecxhormebc5 model is a 5 parameter log-logistic
model modified to accommodate a non-linear hormesis at low
concentrations. It has been modified from the “Brain-Cousens” (BC.5)
model of Ritz et al. (2015), given by the
equation:
with the respective brmsformula being
#> y ~ bot + (top - bot + exp(slope) * x)/(1 + exp(exp(beta) * (x - ec50)))
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> ec50 ~ 1
#> slope ~ 1
The ecxhormebc4 model is a 4 parameter log-logistic
model similar to the ecxhormebc5 model but with a lower
bound of 0, given by the equation:
with the respective brmsformula being
#> y ~ 0 + (top - 0 + exp(slope) * x)/(1 + exp(exp(beta) * (x - ec50)))
#> top ~ 1
#> beta ~ 1
#> ec50 ~ 1
#> slope ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function.
Figure 2 shows the shape of each equation whose name begins with
nec.

Figure 2. The shape of each equation whose name begins
with nec, drawn from chosen parameter values without
fitting, in one panel for each equation. The threshold is at the same
concentration in every panel, and the axes have no scale.
The neclin model is a basic linear decay model
equivalent to ecxlin with the addition of the
NEC step function, given by the equation:
with the respective brmsformula being
#> y ~ top - exp(slope) * (x - nec) * step(x - nec)
#> top ~ 1
#> slope ~ 1
#> nec ~ 1
Because the model contains linear predictors it is not suitable for
0, 1-bounded data (Binomial and Beta distributions with
"identity" link). As the model includes a linear decline
with concentration, it is also not suitable for 0, Inf
bounded data (Gamma, Poisson, Negative Binomial with
"identity" link).
The nec3param model is a basic exponential decay
model equivalent to ecxexp with the addition of the
NEC step function, given by the equation:
with the respective brmsformula being
#> y ~ top * exp(-exp(beta) * (x - nec) * step(x - nec))
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
For Binomial-distributed response data in the case of
"identity" link this model is equivalent to that in Fox (2010). The model is 0-bounded, thus not
suitable for the use of a "logit" or "log"
link function.
The nec4param model is a 3-parameter decay model
with the addition of the NEC step function, given by the
equation:
with the respective brmsformula being
#> y ~ bot + (top - bot) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
The nechorme model is a basic exponential decay
model with an NEC step function equivalent to
nec3param, with the addition of a linear increase prior
to
,
given by the equation
with the respective brmsformula being
#> y ~ (top + exp(slope) * x) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The nechorme model is a hormesis model
(Mattson 2008), allowing an initial
increase in the response variable at concentrations below
.
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function. In this case
the linear version (neclinhorme) should be used.
The nechormepwr model is a basic exponential decay
model with an NEC step function equivalent to
nec3param, with the addition of a power increase prior
to
,
given by the equation:
with the respective brmsformula being
#> y ~ (top + x^(1/(1 + exp(slope)))) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The nechormepwr model is a hormesis model
(Mattson 2008), allowing an initial
increase in the response variable at concentrations below
.
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function. Because the
model can generate predictions above 1 it is excluded from the Binomial,
Beta and Beta-Binomial distributions with an "identity"
link. nechormepwr01 has a non-linear increase bounded
at 1, and is available on those families.
The neclinhorme model is a basic linear decay model
with an NEC step function equivalent to
neclin, with the addition of a linear increase prior to
,
given by the equation:
with the respective brmsformula being
#> y ~ (top + exp(slope) * x) - exp(beta) * (x - nec) * step(x - nec)
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The neclinhorme model is a hormesis model
(Mattson 2008), allowing an initial
increase in the response variable at concentrations below
.
This model contains linear predictors and is not suitable for 0,
1-bounded data (Binomial and Beta distributions with
"identity" link). As the model includes a linear decline
with concentration, it is also not suitable for 0, Inf
bounded data (Gamma, Poisson, Negative Binomial with
"identity" link).
The nechorme4 model is a 4-parameter decay model
with an NEC step function equivalent to
nec4param with the addition of a linear increase prior
to
,
given by the equation:
with the respective brmsformula being
#> y ~ bot + ((top + exp(slope) * x) - bot) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The nechorme4 model is a hormesis model (Mattson 2008), allowing an initial increase in the response variable at concentrations below .
The nechorme4pwr model is a 4-parameter decay model
with an NEC step function equivalent to
nec4param with the addition of a power increase prior
to
,
given by the equation:
with the respective brmsformula being
#> y ~ bot + ((top + x^(1/(1 + exp(slope)))) - bot) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> bot ~ 1
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The nechorme4pwr model is a hormesis model
(Mattson 2008), allowing an initial power
increase in the response variable at concentrations below
.
Because the model can generate predictions above 1 it is excluded from
the Binomial, Beta and Beta-Binomial distributions with an
"identity" link. nechormepwr01 has a
non-linear increase bounded at 1, and is available on those
families.
The nechormepwr01 model is a basic exponential decay
model with an NEC step function equivalent to
nec3param, with the addition of a logistic increase
from
towards 1 prior to
,
given by the equation:
with the respective brmsformula being
#> y ~ (1/(1 + ((1/top) - 1) * exp(-exp(slope) * x))) * exp(-exp(beta) * (x - nec) * step(x - nec))
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> slope ~ 1
The nechormepwr01 model is a hormesis model
(Mattson 2008), allowing an initial
increase in the response variable at concentrations below
.
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function. In this case
the linear version (neclinhorme) should be used. The
increase of nechormepwr01 is bounded above at 1 by
construction, which is what keeps it available on the 0, 1-bounded
families. The same bound excludes it from the 0, Inf
bounded families (Gamma, Poisson, Negative Binomial with an
"identity" link), whose response may exceed 1.
The necsigm model is a simple sigmoidal decay model
equivalent to ecxsigm with the addition of the
NEC step function, given by the equation:
with the respective brmsformula being
#> y ~ top * exp(-exp(beta) * (step(x - nec) * (x - nec))^exp(d) * step(x - nec))
#> top ~ 1
#> beta ~ 1
#> nec ~ 1
#> d ~ 1
The model is 0-bounded, thus not suitable for the use of a
"logit" or "log" link function. In addition,
there may be theoretical issues with combining a sigmoidal decay model
with an NEC step function because where there is an upper
plateau in the data the location of
may become ambiguous. Estimation of No-Effect-Concentrations using this
model are not currently recommended without further testing.
drc NEC models
The drc package (Ritz et al.
2015) fits NEC models with the functions NEC.2(),
NEC.3() and NEC.4(), and two of the three have
an exact equivalent in bayesnec. Given
,
the two packages evaluate the same expression. The
nec4param curve and the NEC.4() curve of
drc 3.0.1 were computed at 201 concentrations between 0 and
10, for 135 combinations of parameter values that included thresholds
below and above that range, and the two were identical in every
case.
drc’s three functions are wrappers around a single
generator that differ only in which parameters they hold fixed (Table
1).
drc |
fixes | bayesnec |
|---|---|---|
NEC.4() |
nothing | nec4param |
NEC.3() |
nec3param | |
NEC.2() |
,
upper
|
none, by choice — see below |
The parameters map as
("bot"),
("top"),
("nec") and
(exp("beta")).
The decay rate is the only substantive difference between the two
implementations. drc estimates the decay rate
directly, whereas bayesnec estimates
and uses
,
so the decay rate is positive by construction. This is a
reparameterisation of the same model over
,
which includes every decline. drc can therefore return
,
a threshold followed by unbounded exponential growth, which
bayesnec cannot represent. A threshold followed by an
increase is available here as nec4param with
,
which stays bounded.
The equivalence is exact in one direction only. Converting a
drc estimate by setting
does not always recover
,
because
is not the identity in floating point. For 200 decay rates between 0.01
and 20,
differed from
for 89, and the largest relative difference between the resulting curves
was
.
A difference of that size between two curves computed from one set of
estimates therefore arises from the round trip, not from either
model.
The model given in ?drc::NEC differs from the model
drc fits. The help page includes an additional log-logistic
term,
,
reproducing the general model of Pires et al.
(2002), but the function drc fits does not include
that term. The equivalences in Table 1 are therefore with the
fitted model, not the documented one.
NEC.2()
NEC.2() fixes the upper asymptote at a constant, by
default 1. Fixing
in this way asserts that the control response is exactly that constant
with no error, which is only defensible for data normalised to a
control.
Normalising to an estimated control discards the control’s
uncertainty and propagates none of it into the NEC, so the
resulting interval is narrower than the data support, and
bnec() gives a message where the response appears to have
been normalised in this way. Where the upper bound is structural, not
estimated (for example, a proportion that cannot exceed one by
construction), the same constraint is available without a new model,
either as a brms constant() prior on
"top" or as a tight informative prior (see Fixing a
parameter in the Priors vignette).
Either way the assumption is written in the prior, where it can be
inspected, instead of being fixed within the equation.