auc: Area under the ROC curve

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/auc.R

Description

Computes Area-under-the-ROC-curve

Usage

1
auc(rocout)

Arguments

rocout

Matrix with two rows

Details

Operates on the output of roc. The rows of the input matrix represent the False Positive Rates (FPR) and corresponding True Positive Rates (TPR) at fixed thresholds.

Value

Numeric. Interpolated Area-under-the-ROC-curve.

Author(s)

Mark A. van de Wiel

See Also

ROC-curves: roc. creating multiple partitions: CreatePartition. Examples: grridge.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Load data objects
data(dataFarkas)

## In this example, we provide one partition only
## see "CreatePartition" for examples in creating multiple partitions
firstPartition <- CreatePartition(CpGannFarkas)

# grFarkas <- grridge(datcenFarkas,respFarkas, firstPartition,monotone=FALSE)

## Prediction of the grridge model to the training samples
#cutoffs <- rev(seq(0,1,by=0.1))
#fakenew <- datcenFarkas
#yhat <- predict.grridge(grFarkas,fakenew)

#rocridgeF <- roc(probs=as.numeric(yhat[,2]),true=respFarkas[1:30],cutoffs=cutoffs)
#auc(rocridgeF)

Example output

Loading required package: penalized
Loading required package: survival
Welcome to penalized. For extended examples, see vignette("penalized").
Loading required package: Iso
Iso 0.0-17
Loading required package: GSEABase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from 'package:penalized':

    as.data.frame

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: XML
Loading required package: graph

Attaching package: 'graph'

The following object is masked from 'package:XML':

    addNode

Warning messages:
1: replacing previous import 'stats::xtabs' by 'BiocGenerics::xtabs' when loading 'GRridge' 
2: replacing previous import 'stats::sd' by 'BiocGenerics::sd' when loading 'GRridge' 
3: replacing previous import 'stats::mad' by 'BiocGenerics::mad' when loading 'GRridge' 
4: replacing previous import 'stats::IQR' by 'BiocGenerics::IQR' when loading 'GRridge' 
5: replacing previous import 'GSEABase::intersect' by 'BiocGenerics::intersect' when loading 'GRridge' 
6: replacing previous import 'penalized::as.data.frame' by 'BiocGenerics::as.data.frame' when loading 'GRridge' 
7: replacing previous import 'GSEABase::setdiff' by 'BiocGenerics::setdiff' when loading 'GRridge' 
8: replacing previous import 'stats::var' by 'BiocGenerics::var' when loading 'GRridge' 
[1] "Summary of group sizes:"
Distant  Island N_Shelf N_Shore S_Shelf S_Shore 
  14047   12858    2006    5262    1765    4062 

GRridge documentation built on Nov. 8, 2020, 5:47 p.m.