ES {GenHMM1d} | R Documentation |
Expected shortfall function
Description
This function computes the expected shortfall of an univariate distribution, excluding zero-inflated.
Usage
ES(p, param, family, size = 0, Nsim = 25000)
Arguments
p |
value (1 x 1) at which the expected shortfall needs to be computed; between 0 and 1; (e.g 0.01, 0.05) |
param |
parameters of the distribution; (1 x p) |
family |
distribution name; run the function distributions() for help |
size |
additional parameter for some discrete distributions; run the command distributions() for help |
Nsim |
number of simulations |
Value
es |
expected shortfall |
Examples
family = "gaussian"
theta = c(-1.5, 1.7) ;
es = ES( 0.01, theta, family)
print('Expected shortfall : ')
print(es$es)
[Package GenHMM1d version 0.2.1 Index]