probsquad(x,structure(Q,L,addcon,grandmean) [, prior:P]), REAL matrix x with no MISSING elements, argument 2 a structure as returned by macro discrimquad(), REAL vector P of prior probabilities with P[i] > 0, default = rep(1/g,g) |
@usage Suppose info = structure(Q,L,addcon,grandmean) as computed by discrimquad(groups, y) summarizes quadratic discriminant functions estimated from a n by p matrix of data from g groups. probsquad(x, info), where x a REAL vector of length p, returns the length g vector of posterior probabilities, assuming multivariate normality of each groups and equal prior probability 1/g for each group. probsquad(x, info, prior:P), where P is a length g vector with P[j] > 0, does the same using P[j]/sum(P) as prior probability of group j. In both these usages x can be a m by p matrix, each row of which is an observation and probsquad() returns a m by g matrix of posterior probabilities. See probsquad() for information about the form of info.