BooleanTable {DanielBiostatistics10th}R Documentation

BooleanTable: Boolean Test-&-Disease and/or Risk-&-Disease Table

Description

To define and create a BooleanTable.

Usage

BooleanTable(x)

Arguments

x

two-by-two integer matrix, contingency table of two Boolean variables, or an R object convertible to a two-by-two integer matrix. The endpoint (i.e., disease) is on rows and the test/risk is on columns.

Details

..

Value

Function BooleanTable returns a BooleanTable object.

Slots

.Data

two-by-two integer matrix, contingency table of a Boolean test-&-disease table with layout

Test (+) Test (-)
Disease (+) x_{++} x_{+-}
Disease (-) x_{-+} x_{--}

or a Boolean risk-&-disease table with layout

Risk Factor (+) Risk Factor (-)
Disease (+) x_{++} x_{+-}
Disease (-) x_{-+} x_{--}

The endpoint (i.e., disease) must be on the rows and the test/risk be on the columns. This set up is to accommodate model.frame.default and let end user use formula endpoint ~ test or endpoint ~ risk.

See Also

End-user may also use function caret::confusionMatrix, which does not provide confidence intervals of sensitivity, specificity, etc.

Examples

x = matrix(c(7L, 3L, 8L, 6L), nrow = 2L)
BooleanTable(x)
(x1 = matrix(c(7L, 3L, 8L, 6L), nrow = 2L, dimnames = list(X = c('a','b'), NULL)))
BooleanTable(x1)


[Package DanielBiostatistics10th version 0.2.4 Index]