R/plsr.R

plsr <- function (Xtrain, Ytrain, Xtest, ncomp = NULL, type = c("simpls", "nipals"), 
                 unit.weights = TRUE, weight = FALSE, beta = 0.1) 
{
  if(type == "simpls"){
    if (unit.weights == TRUE) {
        return(unitsimpls(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
    }
    else {
        return(simpls(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
    }
  }
  else {
        return(nipals(Xtrain, Ytrain, Xtest, ncomp, weight = weight, beta = beta))
  }
}

Try the ftsa package in your browser

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

ftsa documentation built on May 29, 2024, 2:47 a.m.