R/f.R

Defines functions f

f = function(lambda, d, Xs, const, entropy, del, weight.scale, G.scale,..., returnw = FALSE, intercept = rep(0, nrow(Xs))){
  w = d / weight.scale * ginv(drop(Xs %*% lambda / G.scale / weight.scale), 
                              entropy = entropy, del = del, intercept = intercept)
  if(returnw == TRUE){
    return(w)
  }else{
    return(colSums(Xs * w) - const)
  }
}

Try the GECal package in your browser

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

GECal documentation built on Aug. 8, 2025, 6:37 p.m.