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 Sept. 11, 2023, 5:09 p.m.