predict.vqda {vdar} | R Documentation |
predict.vqda
Description
Classify multivariate observations in conjunction with qda() or lda() of class 'vqda' or 'vlda'.
Usage
## S3 method for class 'vqda'
predict(object, newdata, newerror, prior = object$prior, ...)
## S3 method for class 'vlda'
predict(object, newdata, newerror, prior = object$prior, ...)
Arguments
object |
object of class 'vqda' or 'vlda'. |
newdata |
data frame or matrix of cases to be classified or, if object has a formula, a data frame with columns of the same names as the variables used. A vector will be interpreted as a row vector. If newdata is missing, an attempt will be made to retrieve the data used to fit the qda object. |
newerror |
data frame or matrix of uncertainties corresponding to the cases in 'newdata'. |
prior |
the prior probabilities of group membership. If unspecified, the prior of the object are used. |
... |
... |
Value
list containing the following components:
class
factor containing the predicted group
likelihood
matrix of dimension 'number of samples' x 'number of groups', containing the likelihood for each sample to belong to one of the groups
grouping
original grouping of the samples, copied from the input object
list containing the following components:
class
factor containing the predicted group
likelihood
matrix of dimension 'number of samples' x 'number of groups', containing the likelihood for each sample to belong to one of the groups
grouping
original grouping of the samples, copied from the input object
Methods (by class)
-
vqda
: predict() for class 'vqda' -
vlda
: predict() for class 'vlda'
Author(s)
Solveig Pospiech, package 'MASS'