R/cls.R

Defines functions cls

Documented in cls

cls <- function(y, x, R, ca) {
  mod <- Rfast2::cls(y, x, R, ca)
  be <- mod$bcls
  mse <- sum( (y - x %*% be)^2 ) / dim(x)[1]

  list(be = be, mse = mse)
}

Try the cols package in your browser

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

cols documentation built on April 3, 2025, 10:33 p.m.