Learn R Programming

verification (version 1.42)

check.func: check loss function

Description

Calculates the check loss function.

Usage

check.func(u, p)

Value

The check loss for value u and probability level p.

Arguments

u

Value to be evaluated

p

Probability level [0,1]

Author

Sabrina Bentzien

Details

The check loss is calculated as \(\rho_{p} (u) = (abs(u) + (2*p-1)*u)/2\).

Examples

Run this code
## The function is currently defined as
function (u, p) 
{
    rho <- (abs(u) + (2 * p - 1) * u) * 0.5
  }

Run the code above in your browser using DataLab