readingError-class {mspath}R Documentation

Class "readingError"

Description

Describes errors in readings for discrete states. This is a special type of matrix in which rows are the true states and columns are observed states. The diagonal is mostly ignored, since it must be 1 - sum of other elements on the row.

Objects from the Class

Objects can be created by calls of the form readingError(...) where the arguments are the usual ones for matrix.

Slots

.Data:
Object of class "matrix"

Extends

Class "matrix", from data part. Class "structure", by class "matrix", distance 2. Class "array", by class "matrix", distance 2. Class "vector", by class "matrix", distance 3, with explicit coerce. Class "vector", by class "matrix", distance 4, with explicit coerce.

Methods

bitMask
signature(object = "readingError"): returns a matrix with 1's on off-diagonal positive elements, 0 elsewhere.
boolMask
signature(object = "readingError"): return a matrix with|code{TRUE} on off-diagonal positive elements, FALSE elsewhere.
coef
signature(object = "readingError"): returns a vector with only the off-diagonal positive elements, starting with the first row, then the second, and so on.
mean
signature(x = "readingError"): The arguments are one or more readingError's. This returns a readingError whose entries are the means of each of the cells in the arguments. Note that extra arguments to mean elsewhere in R provide optional tuning values for the calculation; that is not the case here.

Note

This class is designed to work with mspath and may not be appropriate for other uses. In particular, coef returns values in the order expected by the inits argument to mspath, which is the transpose of the usual order for R.

Author(s)

Ross Boylan

References

Bacchetti, Peter and Boylan, Ross (2009) “Estimating Complex Multi-State Misclassification Rates for Biopsy-Measured Liver Fibrosis in Patients with Hepatitis C,” The International Journal of Biostatistics: Vol. 5 : Iss. 1, Article 5. DOI: 10.2202/1557-4679.1139 http://www.bepress.com/ijb/vol5/iss1/5

See Also

matrix, mspath, and sample data provided with this package.

Examples

library(mspath)
re <- readingError(c(.73, .27, 0, 0, 0,
                               .02, .73, .25, 0, 0,
                               0, .02, .90, .08, 0,
                               0, 0, 0, .88, .13,
                               0, 0, 0, .07, .93),
                             byrow=TRUE, nrow=5, ncol=5)
coef(re)

[Package mspath version 0.9-9 Index]