computeAUC: computeAUC: computes AUC

Description Usage Arguments Details Examples

View source: R/computeAUC.R

Description

This function computes the area under a dose-response curve of the form survival fraction SF = exp(-alpha * D - beta * D ^ 2).

Usage

1
2
computeAUC(D, SF, pars, lower, upper, trunc = TRUE, SF_as_log = FALSE,
  area.type = c("Fitted", "Actual"), verbose = TRUE)

Arguments

D

vector of dosages

SF

vector of survival fractions

pars

parameters (alpha, beta) in equation y = exp(-alpha * x - beta * x ^ 2)

lower

lower bound of dose region to compute AUC over

upper

upper bound of dose region to compute AUC over

trunc

should survival fractions be truncated downward to 1 if they exceed 1?

SF_as_log

A boolean indicating whether survival fraction is displayed on a log axis. Defaults to FALSE

area.type

should the AUC of the raw (D, SF) points be returned, or should the AUC of a curve fit to said points be returned instead?

verbose

how detailed should error and warning messages be? See details.

Details

If lower and/or upper are missing, the function assumes their values to be the minimum and maximum D-values, respectively. For all warnings to be silent, set trunc = FALSE. For warnings to be output, set trunc = TRUE. For warnings to be output along with the arguments that triggered them, set trunc = 2.

Examples

1
computeAUC(D=c(0.1, 0.5, 0.7, 0.9), pars=c(0.2, 0.1), lower = 0, upper = 1) # Returns 0.7039296

RadioGx documentation built on Dec. 20, 2019, 1:06 a.m.