Description Usage Arguments Value Author(s) Examples
Returns a data.frame
summarizing the cummulative true- and
false-positive probabilities from expected and observed
classifications.
1 |
exp |
|
obs |
Predicted probability of assignment to the group identified
by |
... |
Additional arguments, available to methods. |
A data.frame
with columns
TruePositive |
Cummulative probability of correct assignment. |
FalsePositive |
Cummulative probability of incorrect assignment. |
Martin Morgan mailto:mtmorgan@fhcrc.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(lattice)
## count matrix
fl <- system.file(package="DirichletMultinomial", "extdata",
"Twins.csv")
count <- t(as.matrix(read.csv(fl, row.names=1)))
## phenotype
fl <- system.file(package="DirichletMultinomial", "extdata",
"TwinStudy.t")
pheno0 <- scan(fl)
lvls <- c("Lean", "Obese", "Overwt")
pheno <- factor(lvls[pheno0 + 1], levels=lvls)
names(pheno) <- rownames(count)
## count data used for cross-validation, and cross-validation
count <- csubset(c("Lean", "Obese"), count, pheno)
data(bestgrp)
## true, false positives from single-group classifier
bst <- roc(pheno[rownames(count)] == "Obese",
predict(bestgrp, count)[,"Obese"])
head(bst)
## lattice plot
xyplot(TruePostive ~ FalsePositive, bst, type="l",
xlab="False Positive", ylab="True Positive")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.