Description Usage Arguments Details Value Note Author(s) Examples
Calculates the check loss function.
1 | check.func(u, p)
|
u |
Value to be evaluated |
p |
Probability level [0,1] |
The check loss is calculated as ρ_{p} (u) = (abs(u) + (2*p-1)*u)/2.
The check loss for value u and probability level p.
This function is used within quantileScore
.
Sabrina Bentzien
1 2 3 4 5 | ## The function is currently defined as
function (u, p)
{
rho <- (abs(u) + (2 * p - 1) * u) * 0.5
}
|
Loading required package: fields
Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.1-1 (2017-07-02) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: 'spam'
The following objects are masked from 'package:base':
backsolve, forwardsolve
Loading required package: maps
Loading required package: boot
Loading required package: CircStats
Loading required package: MASS
Loading required package: dtw
Loading required package: proxy
Attaching package: 'proxy'
The following object is masked from 'package:spam':
as.matrix
The following objects are masked from 'package:stats':
as.dist, dist
The following object is masked from 'package:base':
as.matrix
Loaded dtw v1.18-1. See ?dtw for help, citation("dtw") for use in publication.
function (u, p)
{
rho <- (abs(u) + (2 * p - 1) * u) * 0.5
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.