Nothing
## File Name: cdm_penalty_threshold_scad.R
## File Version: 0.05
cdm_penalty_threshold_scad <- function(beta, lambda, a=3.7)
{
sign_beta <- sign(beta)
#-- 2*lambda < abs(beta) < a*lambda
y <- ( ( a - 1 ) * beta - sign_beta * a * lambda ) / ( a - 2 )
#-- abs(beta) > a*lambda
y <- ifelse( abs(beta) > a*lambda, beta, y )
#-- abs(beta) < 2*lambda
z <- ( abs(beta) - lambda )
z <- ifelse( z < 0, 0, z )
y <- ifelse( abs(beta) < 2*lambda, z*sign_beta, y )
return(y)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.