Description Usage Arguments Details Value Author(s) Examples

Functions to calculate and plot Receiver Operating Characteristic (ROC) curves for one or more sets of predictions, and for one or more objects of class `mixmod`

or `mdmixmod`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## Default S3 method:
rocinfo(x, labels, quasi=FALSE, ...)
## S3 method for class 'mixmod'
rocinfo(x, labels, quasi=FALSE, ...)
## S3 method for class 'rocinfo'
plot(x, legend="x", cex.legend=1, auc=TRUE, dca=TRUE,
col=1, lty=1, lwd=1, ylab="true positive rate",
xlab=ifelse(x$quasi, "all positive rate", "false positive rate"),
grid=FALSE, gridres=0.1, gridcol="lightgray", gridlty="dashed", ...)
## Default S3 method:
rocauc(x, labels, quasi=FALSE, ...)
## S3 method for class 'mixmod'
rocauc(x, labels, quasi=FALSE, ...)
multiroc(x, labels, quasi=FALSE)
## S3 method for class 'multiroc'
plot(x, legend=names(x), cex.legend=1, auc=TRUE, dca=FALSE, bw=FALSE,
col=(if(bw) rep(1, length(x)) else 1:length(x)),
lty=(if(bw) 1:length(x) else rep(1, length(x))),
lwd=rep(1, length(x)), ylab="true positive rate",
xlab=ifelse(x[[1]]$quasi, "all positive rate", "false positive rate"),
grid=FALSE, gridres=0.1, gridcol="lightgray", gridlty="dashed", ...)
``` |

`x` |
for |

`labels` |
a vector of logical values of the same length as the probabilities, in which a value of |

`quasi` |
logical; if |

`legend` |
character or |

`cex.legend` |
magnification to be used for legend text. |

`auc` |
logical; if |

`dca` |
logical; if |

`bw` |
logical; if |

`col, lty, lwd, ylab, xlab` |
as the equivalent arguments to |

`grid` |
logical; if |

`gridres, gridcol, gridlty` |
resolution, color, and line type for the grid. No effect if |

`...` |
further arguments to |

`rocinfo`

calculates the ROC curve x coordinates (false positive rate, or all positive rate if `quasi`

is `TRUE`

), y coordinates (true positive rate), AUC, and DCA for the given probabilities and labels. `multiroc`

performs the same function for multiple probabilities, and optionally multiple labels.

For `rocinfo`

, a list of class `rocinfo`

having the following elements:

`tpr` |
the true positive rate in ascending order of the probabilities. |

`fpr` |
the false positive rate in ascending order of the probabilities. |

`apr` |
the all positive rate in ascending order of the probabilities. |

`auc` |
the Area Under the Curve. |

`dca` |
the Distance of Closest Approach. |

`quasi` |
logical; the same as the argument to |

For `rocauc`

, the numerical value of the AUC.

For `multiroc`

, a list of class `multiroc`

having elements of class `rocinfo`

.

The `plot`

and `lines`

methods are used for their side effects.

Daniel Dvorkin

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
## Not run:
### multiple ROC curves for a single set of labels
data(CiData)
data(CiGene)
CiJoint <- lapply(namedList("layered", "chained"), function(top)
mdmixmod(CiData, c(2,3,2), family=c("pvii", "norm", "pvii"),
topology=top))
CiMarginal <- marginals(CiJoint$layered) # same for $layered and $chained
CiFits <- c(CiJoint, CiMarginal)
sapply(CiFits, rocauc, labels=CiGene$target)
# layered chained binding expression conservation
# 0.8507258 0.8913765 0.8596395 0.7943286 0.7479479
plot(multiroc(CiFits, CiGene$target), grid=TRUE)
### multiple ROC curves for multiple labels
DlFits <- mdmixmod(DlData, c(2,2,2), family=c("norm", "norm", "pvii"))
AllFits = list(Ci=CiJoint$chained, Dl=DlFits)
plot(multiroc(AllFits, list(Ci=CiGene$target, Dl=DlGene$target)))
## End(Not run)
``` |

lcmix documentation built on May 21, 2017, 4:05 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.