Learn R Programming

grt (version 0.2.1)

qdb.p.correct: the proportion correct of the quadratic decision boundary.

Description

Calculate the proportion correct obtained by categorizing samples form one multivariate normal population using the quadratic decision boundary.

Usage

qdb.p.correct(x, qdb, refpts = colMeans(x))

Arguments

x

a vector or matrix containing the values of samples from one multivariate normal population.

qdb

object of class gqcStruct or a vector containing the values for coeffs and bias of an quadratic decision bound.

refpts

a numeric vector used as a reference point to determine the correct side of the qdb for classifying x. The length(refpts) should be equal to ncol(x). Default to colMeans(x).

Details

The function assumes that all the points specified in x belong to just one category.

References

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

Examples

Run this code
# NOT RUN {
data(subjdemo_2d)
tmp <- split(subjdemo_2d, subjdemo_2d$category)
mc <- mcovs(category ~ x + y, data=subjdemo_2d, pooled=FALSE)
db <- qdb(mc$means, mc$covs)
qdb.p.correct(tmp[[1]][,2:3], db)
# }

Run the code above in your browser using DataLab