drc (version 3.0-1)

predict.drc: Prediction

Description

Predicted values for models of class 'drc' or class 'mrdrc'.

Usage

"predict"(object, newdata, se.fit = FALSE, interval = c("none", "confidence", "prediction"), level = 0.95, na.action = na.pass, od = FALSE, vcov. = vcov, ...)
"predict"(object, newdata, se.fit = FALSE, interval = c("none", "confidence", "prediction"), level = 0.95, pava = FALSE, ...)

Arguments

object
an object of class 'drc'.
newdata
An optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.
se.fit
logical. If TRUE standard errors are required.
interval
character string. Type of interval calculation: "none", "confidence" or "prediction".
level
Tolerance/confidence level.
na.action
function determining what should be done with missing values in 'newdata'. The default is to predict 'NA'.
od
logical. If TRUE adjustment for over-dispersion is used.
vcov.
function providing the variance-covariance matrix. vcov is the default, but sandwich is also an option (for obtaining robust standard errors).
pava
logical. If TRUE the fit is monotoniosed using pool adjacent violators algorithm.
...
further arguments passed to or from other methods.

Value

A matrix with as many rows as there are dose values provided in 'newdata' or in the original dataset (in case 'newdata' is not specified) and columns with fitted, standard errors, lower and upper limits of confidence intervals.

Details

For the built-in log-logistics and Weibull-type models standard errors and confidence/prediction intervals can be calculated. At the moment it only works for the situations where all observations are assumed to have a common variance.

See Also

For details are found in the help page for predict.lm.

Examples

Run this code

## Fitting a model
spinach.model1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4())

## Predicting values a dose=2 (with standard errors)
predict(spinach.model1, data.frame(dose=2, CURVE=c("1", "2", "3")), se.fit = TRUE)

## Getting confidence intervals
predict(spinach.model1, data.frame(dose=2, CURVE=c("1", "2", "3")), 
interval = "confidence")

## Getting prediction intervals
predict(spinach.model1, data.frame(dose=2, CURVE=c("1", "2", "3")), 
interval = "prediction")

Run the code above in your browser using DataLab