predict.prmda: Predict method for models of class prmda

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/predict.prmda.R

Description

Predictions for a PRM-DA classification model.

Usage

1
2
## S3 method for class 'prmda'
predict(object, newdata, ...)

Arguments

object

object of class prmda.

newdata

optional data frame with new observations.

...

further arguments. Currently not used.

Details

If newdata is specified the PRM-DA classification model is used to predict the fitted values for this data set, otherwise the fitted values of the model are returned.

Value

predict.prmda returns a vector of the predicted classmembership.

Author(s)

Irene Hoffmann

References

Hoffmann, I., Filzmoser, P., Serneels, S., Varmuza, K., Sparse and robust PLS for binary classification.

See Also

prmda, prmdaCV

Examples

1
2
3
4
data(iris)
data <- droplevels(subset(iris,iris$Species!="setosa"))
mod <- prmda(Species~.,data, a=2, class="lda")
table(data$Species, predict(mod))

sprm documentation built on May 19, 2017, 11:30 p.m.

Search within the sprm package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.