Learn R Programming

grt (version 0.2.1)

ldb: Linear Decision Bound

Description

Find coefficients of the ideal linear decision boundary given the means and covariance of two categories.

Usage

ldb(means, covs, 
    covstruct = c("unstructured", "scaledIdentity", "diagonal", "identity"),
    noise = 10)

Arguments

means

a list of vectors containing means of two distributions.

covs

a matrix or a list of matrix containing the covariance matrix common to the two distributions.

covstruct

character. If "unstructured", the supplied covs is used as-is. If "scaledIdentity", a diagonal covariance matrix with one common variance is used; when the supplied covs has different values on its diagonal, the mean of the diagonal is used. If "diagonal", a diagonal covariance matrix with varying diagonal is used. If "identity", an identity matrix is used. Default to "unstructured"

noise

numeric value. See Details. Default to 10.

Value

The object of class glcStruct

Details

The order of vectors in the list means matters as the sign of coeffs and bias in the output will be reversed.

The argument noise is only for convenience; the supplied value is simply bypassed to the output for the subsequent use, i.e., as object of class glcStruct.

References

Alfonso-Reese, L. A. (2006) General recognition theory of categorization: A MATLAB toolbox. Behavior Research Methods, 38, 579-583.

See Also

mcovs, qdb, glcStruct, glc

Examples

Run this code
# NOT RUN {
m <- list(c(187, 142), c(213.4, 97.7))
covs <- diag(c(625, 625))
foo <- ldb(means=m, covs=covs)

# }

Run the code above in your browser using DataLab