Table {BranchGLM} | R Documentation |
Confusion Matrix
Description
Creates a confusion matrix and calculates related measures.
Usage
Table(object, ...)
## S3 method for class 'numeric'
Table(object, y, cutoff = 0.5, ...)
## S3 method for class 'BranchGLM'
Table(object, cutoff = 0.5, ...)
Arguments
object |
a |
... |
further arguments passed to other methods. |
y |
observed values, can be a numeric vector of 0s and 1s, a two-level factor vector, or a logical vector. |
cutoff |
cutoff for predicted values, the default is 0.5. |
Value
A BranchGLMTable
object which is a list with the following components
table |
a matrix corresponding to the confusion matrix |
accuracy |
a number corresponding to the accuracy |
sensitivity |
a number corresponding to the sensitivity |
specificity |
a number corresponding to the specificity |
PPV |
a number corresponding to the positive predictive value |
levels |
a vector corresponding to the levels of the response variable |
Examples
Data <- ToothGrowth
Fit <- BranchGLM(supp ~ ., data = Data, family = "binomial", link = "logit")
Table(Fit)
[Package BranchGLM version 2.1.6 Index]