R/predict.kernelfit.pls2.R

Defines functions predict.kernelpls.fit2

Documented in predict.kernelpls.fit2

## File Name: predict.kernelfit.pls2.R
## File Version: 0.06


# prediction for kernelpls.fit2 function
predict.kernelpls.fit2 <- function( object, X, ... )
{
    xmm <- matrix( object$Xmeans, nrow=nrow(X),ncol=ncol(X), byrow=TRUE)
    xc <- X - xmm
    # calculate projected scores
    scores <- xc %*% object$projection
    return(scores)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on May 29, 2024, 11:05 a.m.