R/mdmb_regression_logistic_density.R

Defines functions mdmb_regression_logistic_density

## File Name: mdmb_regression_logistic_density.R
## File Version: 0.06

mdmb_regression_logistic_density <- function( y, ypred, log, eps=1E-50 )
{
    yp <- stats::plogis( ypred )
    ll_i <- ifelse( y==1, yp, 1 - yp )
    if (log){
        ll_i <- log( ll_i + eps )
    }
    return(ll_i)
}
alexanderrobitzsch/mdmb documentation built on July 18, 2024, 11:14 p.m.