Learn R Programming

textir (version 1.8-5)

predict.pls: pls predict

Description

Predict function for Partial Least Squares

Usage

## S3 method for class 'pls':
predict( object, newdata, response=TRUE, ... )

Arguments

object
An output object from the pls function.
newdata
An nrow(object$loadings)-column matrix of multinomial phrase/category counts for new documents/observations. Can be either a simple matrix or a simple_triplet_matrix.
response
An indicator for whether to scale predictions to the original response.
...
Additional unused arguments.

Value

  • Output is an nrow(newcounts) by ncol(object$loadings) matrix of pls directions for each new observation.

Details

This function returns the pls projection $X\Phi$ for new covariates, or $\alpha + \beta*X\phi$ if response=TRUE with regression coefficients taken from object$fwdmod.

References

Taddy (2011), Inverse Regression for Analysis of Sentiment in Text. http://arxiv.org/abs/1012.2098

See Also

pls, congress109