R/A_clere.R

Defines functions A_clere

# '
A_clere <- function(y = y, x = x, g = NULL, analysis = "aic") {
   requireNamespace("clere")
   x = 1 * as.matrix(x)
   if (is.null(g)) {
      g = min(5, ncol(x)) # ncol(x)
   }
   model <- clere::fitClere(y = as.numeric(y), x = x, g = g, plotit = FALSE, analysis = analysis)
   A = c(model@intercept, rowMeans(model@Bw))
   return(A)
}

Try the CorReg package in your browser

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

CorReg documentation built on Feb. 20, 2020, 5:07 p.m.