Learn R Programming

drc (version 4.0-0)

predict.drc: Prediction

Description

Predicted values for models of class 'drc'.

Usage

# S3 method for drc
predict(object, newdata, se.fit = FALSE, 
  interval = c("none", "confidence", "prediction", "ssd"), 
  level = 0.95, na.action = na.pass, vcov. = vcov, 
  ssdSEfct = NULL, constrain = TRUE, checkND = TRUE, ...)

Arguments

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, at most, 4 columns containing fitted, standard errors, lower and upper limits of confidence/prediction intervals.

Details

For the built-in log-logistic, log-normal, and Weibull-type models standard errors and confidence/prediction intervals can be calculated. For other built-in models it may not yet be implemented (drop us an e-mail if you need them).

The function for interpolating standard errors of estimates, which may be used when fitting an SSD, should have 3 arguments: observed estimates and corresponding standard errors and future estimates and should return interpolated standard errors corresponding to the future estimates provided.

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