R/cdm_penalty_values_tlp_approximation.R

Defines functions cdm_penalty_values_tlp_approximation

## File Name: cdm_penalty_values_tlp_approximation.R
## File Version: 0.10

cdm_penalty_values_tlp_approximation <- function(x, tau, lambda )
{
    y <- abs(x) / tau
    J1 <- y
    J2 <- y - ifelse( y - 1 < 0, y, 1 )
    z <- lambda*(J1 - J2)
    return(z)
}

Try the CDM package in your browser

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

CDM documentation built on Aug. 25, 2022, 5:08 p.m.