eadrm.ci {eadrm} | R Documentation |
Computes confidence intervals for an eadrm model fit
Description
Calculates confidence intervals for an eadrm model fit by repeatedly fitting the model to the same data set and examining the distribution of the coefficients.
Usage
eadrm.ci(obs, xvals, model = "h4", ..., B = 1000)
Arguments
obs |
A vector of response values (y-values). |
xvals |
A vector of doses (x-values). |
model |
Type of dose-response model to fit. Possible values include "h3", "h4", and "h5" (corresponding to 3-parameter, 4-parameter, and 5-parameter log-logistic models, respectively) and "e" (corresponding to an exponential model). Defaults to "h4". |
... |
Additional parameters for the eadrm function. |
B |
Number of replicate models to fit. Defaults to 1000. |
Value
A list containing the following elements:
- med.est:
A vector of the median values of the coefficients across the B iterations
- l95.est,u95est:
Vectors of the lower/upper 95% confidence bounds for the coefficients across the B iterations
- replicate.mat:
A p x B matrix, where p is the number of coefficients in the model. Each column of B corresponds to the coefficients for one fitted model.
Details
This function calls the eadrm
function B times with
the same parameters and records the model coefficients for each
iteration of the model. Confidence intervals for the coefficients
are calculated by examining the quantiles of the distribution
of the coefficients over the B iterations. A matrix of the
coefficients for each iteration is also calculated. This matrix
can be used to compute confidence intervals for predicted values
and estimates of EC50.
See Also
eadrm
, predict.eadrm
,
calc.ec
, calc.ed
Examples
ea.ci <- eadrm.ci(CarboA$y, CarboA$x)