R/rescale_betahat.r

Defines functions rescale_betahat

rescale_betahat = function(activeSet, betahat, X, Z, levels, n){

  if (is.null(activeSet)) return(betahat)
  
  nVars = sapply(activeSet, function(x) if (is.null(x)) 0 else nrow(x))
  betaLen = length(betahat)
  indices = lapply(activeSet, function(x) if (!is.null(x)) c(t(x)) else NULL)

  .Call("R_rescale_beta", X, Z, n, betahat, betaLen, nVars, levels, indices$cat, indices$cont, indices$catcat, indices$contcont, indices$catcont, double(betaLen))
}

  

Try the glinternet package in your browser

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

glinternet documentation built on Sept. 5, 2021, 5:28 p.m.