predict.fitIC50: Predict responses based on input dose information and fitted...

Description Usage Arguments Value Examples

View source: R/predictIC50.R

Description

This function predicts the response based on input fitted log-logistic model and concentration values.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'fitIC50'
predict(
  object,
  newdata = NULL,
  se.fit = FALSE,
  level = 0.95,
  interval = c("none", "confidence", "prediction"),
  ...
)

Arguments

object

an object of class 'fitIC50', generated by fitIC50 function

newdata

a numeric vector or data fram with one column that contains the new concentration values If omitted, the concentrations used to fit the model are used.

se.fit

not used, mainly for geom_smooth purpose

level

not used, mainly for geom_smooth purpose

interval

not used, mainly for geom_smooth purpose

...

further arguments to be passed to ggplot when using geom_smooth().

Value

a vector of predicted response based on a fitted model and input concentration values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# create an example dose-response table
doseTab <- data.frame(viability = c(1.0, 0.95, 0.5, 0.2, 0.1),
                      concentration = c(0.001, 0.01, 0.1, 1, 10))

# fit a four-parameter logistic model using dr4pl package
mm <- fitIC50(viability ~ concentration, data = doseTab)

# Predict response using the input concentrations
predict(mm)

# Predict response using new concentrations
predict(mm, newdata = c(0.25, 2.5, 5, 15))

lujunyan1118/DrugScreenExplorer_dev documentation built on Dec. 21, 2021, 12:42 p.m.