R/Soft.R

Defines functions Soft

Soft <- function(a,b){
  if(b<0) stop("Can soft-threshold by a nonnegative quantity only.")
  return(sign(a)*pmax(0,abs(a)-b))
}

Try the latentgraph package in your browser

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

latentgraph documentation built on Dec. 15, 2020, 5:23 p.m.