Learn R Programming

HiDimDA (version 0.2-0)

canldaRes: Class object used for storing the results of a canonical high-dimensional linear discriminant analysis.

Description

predict.ldaRes Classifies multivariate observations in conjunction with a canldaRes object. print.ldaRes is the S3 print method for canldaRes objects. coef.ldaRes is the S3 coef method for canldaRes objects.

Usage

## S3 method for class 'canldaRes':
predict(object, newdata, prior=object$prior, grpcodes=NULL, nbvrs=ncol(object$scaling), ...)

Arguments

object
An object of class canldaRes.
newdata
Matrix of cases to be classified.
prior
The prior probabilities used.
grpcodes
Factor with the class codes. Set to 0:k-1 (k being the number of different classes) by default.
nbvrs
Number of canonical discriminant variables used for prediction.
...
Further arguments passed to or from other methods.

Value

  • A list with components
  • classThe MAP classification (a factor)
  • ZsqDistancesA matrix with the squared Euclidean distance, in the discriminant space, of each new observation to the group centroids.
  • priorThe prior probabilities used.
  • ZsqDprioradjThe adjustments to squared Euclidean distance, induced by the chosen (or estimated) prior probabilities.
  • ZA matrix with the values of the canonical discriminant variates.
  • ZmeansA matrix with the canonical-space group centroids.

See Also

Dlda, Mlda, Slda, RFlda, print, coef, clldaRes, CovE, , ICovE