game-aux {QRM} | R Documentation |
Auxiliary Functions for Extracting/Computing Results Related to gamGPDfit()/gamGPDboot()
Description
get.gam.fit()
extracts a convenient list containing unique
covariate combinations and corresponding fitted values from an
object returned by gam()
.
gam.predict()
computes a convenient list containing unique
covariate combinations and corresponding predicted values and
pointwise asymptotic confidence intervals (obtained from the estimated
standard errors obtained by predict(..., se.fit=TRUE)
).
get.GPD.fit()
extracts a convenient list containing (for each
of the GPD parameters) unique
covariate combinations, the fitted GPD parameter (vector),
bootstrapped pointwise two-sided 1-\alpha
confidence
intervals, and a matrix of bootstrapped parameter values.
GPD.predict()
computes a convenient list containing (for each
of the GPD parameters) unique
covariate combinations and corresponding predicted values.
risk.measure()
computes the selected risk measure at a matrix
of values for \rho
, \xi
, \beta
.
Usage
get.gam.fit(x)
gam.predict(x, newdata=NULL, alpha=0.05, value=c("lambda", "rho"))
get.GPD.fit(x, alpha=0.05)
GPD.predict(x, xi.newdata=NULL, beta.newdata=NULL)
risk.measure(x, alpha, u, method = c("VaR", "ES"))
Arguments
x |
For |
newdata |
object as required by
|
xi.newdata , beta.newdata |
as |
alpha |
for |
u |
threshold. |
value |
either |
method |
|
Details
Note that if gam()
fails in gamGPDfit()
or the
fitting or one of the bootstrap replications in gamGPDboot()
,
then x
contains (an) empty (sub)list(s). These empty lists will
be removed from the output of get.GPD.fit()
. Hence, the
subcomponent xi$fit
of the output of get.GPD.fit()
can
contain less columns than the chosen number of bootstrap replications
for creating x
(each bootstrap replication with failed
gam()
calls is omitted). If there is any such failure,
get.GPD.fit()
outputs a warning. These
failures typically happen for too small sample sizes.
Value
get.gam.fit()
returns a list with components
covar
:(unique/minimalized) covariate combinations;
fit
:corresponding fitted values of lambda or rho.
gam.predict()
returns a list with components
covar
:covariate combinations as provided by
newdata
;predict
:predicted lambda or rho;
CI.low
:lower confidence interval (based on predicted values);
CI.up
:upper confidence interval (based on predicted values).
get.GPD.fit()
returns a list with components
xi
:list with components
covar
:(possibly empty)
data.frame
containing the unique/minimal covariate combinations for the covariates used for fitting\xi
;fit
:corresponding fitted
\xi
;CI.low
:lower confidence interval (bootstrapped pointwise two-sides 1-
\alpha
);CI.up
:upper confidence interval (bootstrapped pointwise two-sides 1-
\alpha
);boot
:matrix
containing the corresponding bootstrapped\xi
's (orNULL
if none of the bootstrap repetitions worked).
beta
:similar as for
xi
.
GPD.predict()
returns a list with components
xi
:list with components
covar
:data.frame
containing the covariate combinations as provided byxi.newdata
;predict
:predicted
\xi
's;
beta
:similar as for
xi
.
risk.measure()
returns a vector of values of the selected risk measure.
Author(s)
Marius Hofert
References
Chavez-Demoulin, V., Embrechts, P., and Hofert, M., An extreme value approach for modeling Operational Risk losses depending on covariates.
Examples
## see demo(game) for how to use these functions