Table {BranchGLM} | R Documentation |
Creates confusion matrix and calculates related measures.
Table(object, ...)
## S3 method for class 'numeric'
Table(object, y, cutoff = 0.5, ...)
## S3 method for class 'BranchGLM'
Table(object, cutoff = 0.5, ...)
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. |
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 |
Data <- ToothGrowth
Fit <- BranchGLM(supp ~ ., data = Data, family = "binomial", link = "logit")
Table(Fit)