R/glamer_4lm_help.R

Defines functions glamer_4lm_help

glamer_4lm_help <- function(S, betas_with_intercept, X, y, fl, clust.method, lam){
  if (sum(S) == 0) {
    mm <- stats::lm.fit(as.matrix(rep(1,length(y))), y)
    return(list(b = c(1, rep(0, sum(fl-1))), rss = sum(mm$res^2)))
  }

  mfin <- clusters1D_4lm_help(S, betas_with_intercept, X, y, clust.method, lam)
  return(mfin)
}

Try the DMRnet package in your browser

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

DMRnet documentation built on Aug. 7, 2023, 5:11 p.m.