bayesnechurdlefitR/bayesnechurdlefit-methods.R
nsec.bayesnechurdlefit.RdExtracts the predicted NSEC value from a bayesnechurdlefit
An object of class bayesnechurdlefit.
Probability value to use as the lower quantile to test significance of the predicted posterior values.
The number of unique x values over which to find NSEC. The crossing is located by linear interpolation between the two grid values that bracket it, so precision saturates well below the grid spacing. The default is 500 grid values, matching toxval. A finer grid can change an interpolated crossing and increases prediction time. With an inline predictor transformation the grid is even on the fitted scale.
A range of x values over which to consider extracting NSEC.
NULL or identity leaves the estimate on
x_scale. Any other function is applied to the estimate on the
selected scale. With an inline predictor transformation, a function on
the default recorded scale gives a warning; see Details.
"recorded" (the default) returns the predictor on
its recorded scale. "fitted" returns it on the scale fitted by
crf(). The scales differ only where crf() transforms the
predictor inline.
A vector indicating the probability values over which to return the estimated NSEC value. Defaults to 0.5 (median) and 0.025 and 0.975 (95 percent credible intervals).
The bound beyond which the estimate is reported as
censored. FALSE, the default, censors at the ends of the prediction
grid. A single number is an upper limit, and a pair of numbers is a lower
and an upper limit, in that order; points are appended while the original
grid points and their spacing are retained.
TRUE is refused here, because every NSEC is read off a fitted curve.
See the Extrapolation section of nsec.
Further arguments to pass to class specific methods. A method refuses any argument it does not use.
Should the full posterior be returned instead of a summary?
Which curve to use: "combined" (the default),
"growth" or "survival".
How observed group levels are combined. "none" returns
per-level estimates. "mixture" gives each posterior draw to one level, in
proportion to the levels' observation counts, and keeps it at its position,
so that draw i of the mixture comes from posterior iteration
i. Separate fits with different numbers of draws are instead each
sampled over their full posterior. "mean_estimate" averages the levels'
estimates at each draw, and "mean_curve" estimates from their weighted
mean curve. A joint fit defaults to "none"; other fits with spanning group
terms default to "mixture".
"own" reads each level's control recorded at fitting, or
its lowest observed concentration for an older fit or one fitted without
x_control. "shared" reads the lowest control across levels;
a single finite number specifies
the concentration directly. A control below a level's observations
extrapolates its curve, and gives a warning unless it is the control
recorded at fitting. Level controls are recorded in the result's
x_control attribute.
The NSEC estimate and credible bounds, or one value per draw
with posterior = TRUE. Censored draws are Inf above the
search range and -Inf below it.
Without x_range, every NSEC, growth included, is searched
for over the whole concentration series, the survival component's range, and
is reported as censored at its top where the curve has not reached the
reference by the highest concentration tested. extrapolate extends
that range. See ecx.bayesnechurdlefit for the reasoning.
For a group term spanning concentrations, each observed level pairs its
growth and survival predictions before the endpoint is read. A level
observed at one concentration is excluded. pool and
x_control use the same rules as for a single fit.