Description Usage Arguments Details Value Examples
Calculate the area under the curve for longitudinal data.
1 2 3 4 5 6 7 | auc.args(baseadj = TRUE, missadj = "last.known", onlybase = "NA",
nobase = "NA", rescale = NULL)
auc(y, t, data, baseadj = FALSE, missadj = c("NA", "zero", "0", "none",
"last.known", "lowest", "smallest", "highest", "biggest", "first", "baseline",
"average", "mean"), onlybase = c("NA", "zero", "0"), nobase = c("NA",
"zero", "0", "none"), rescale = NULL)
|
baseadj |
Logical, denoting whether the AUC should be centered at the baseline value (baseadj = TRUE) or not (baseadj = FALSE) (DEFAULT). |
missadj |
A flag denoting how to deal with missing values at the end of y.
|
onlybase |
A flag denoting how to deal with cases where there is only one non-missing value. onlybase = 'zero' (or '0') will set the AUC to 0, while onlybase = 'NA' will set it to NA (DEFAULT). |
nobase |
A flag denoting how to deal with a missing baseline value.
|
rescale |
(Optional) A number denoting how to scale the AUC; if not missing, the average AUC per time unit will be calculated and multiplied by this value. (DEFAULT NULL means the AUC will not be scaled) |
y |
A vector of y-values of any length, or else a character string denoting which column in data the y-values should be taken from. |
t |
A vector of t- (x-) values of the same length as y, or else a character string denoting which column in data the t-values should be taken from. If t is missing, the y-values are assumed to come in regular intervals (i.e. 1:length(y)). |
data |
An optional data.frame from which y and t come. |
auc
won't work if you specify the data parameter but also specify vectors for y or t.
It also won't work if there are any missing (non-finite) t-values. Any non-finite y-values are ignored.
auc.args
creates a list giving the five "adjustment" variables in auc
.
The defaults are NOT the same as the defaults in auc
, however.
No error checking is done here! I'm counting on auc
to catch all of those.
auc
returns the area under the curve.
auc.args
returns a list giving the five values. Used mostly as default arguments to other functions.
1 2 3 4 5 6 7 | auc(c(1,0,2,1,1,NA), missadj = 'none')
auc(c(1,0,2,1,1,NA), missadj = 'last.known')
auc(c(1,0,2,1,1,NA), missadj = 'lowest')
auc(c(1,0,2,1,1,NA), missadj = 'highest') # and so on
data <- data.frame(time = c(0,2,3,8), fold.change = c(1, 2, 3, 3))
auc("fold.change", "time", baseadj = TRUE, data = data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.