Title: | Optimally Robust Estimation for Extreme Value Distributions |
---|---|
Description: | Optimally robust estimation for extreme value distributions using S4 classes and methods (based on packages 'distr', 'distrEx', 'distrMod', 'RobAStBase', and 'ROptEst'); the underlying theoretic results can be found in Ruckdeschel and Horbenko, (2013 and 2012), \doi{10.1080/02331888.2011.628022} and \doi{10.1007/s00184-011-0366-4}. |
Authors: | Nataliya Horbenko [aut, cph], Bernhard Spangl [ctb] (contributed smoothed grid values of the Lagrange multipliers), Sascha Desmettre [ctb] (contributed smoothed grid values of the Lagrange multipliers), Eugen Massini [ctb] (contributed an interactive smoothing routine for smoothing the Lagrange multipliers and smoothed grid values of the Lagrange multipliers), Daria Pupashenko [ctb] (contributed MDE-estimation for GEV distribution in the framework of her PhD thesis 2011--14), Gerald Kroisandt [ctb] (contributed testing routines), Matthias Kohl [aut, cph] , Peter Ruckdeschel [cre, aut, cph] |
Maintainer: | Peter Ruckdeschel <[email protected]> |
License: | LGPL-3 |
Version: | 1.3.1 |
Built: | 2024-11-03 05:06:03 UTC |
Source: | https://github.com/r-forge/robast |
RobExtremes provides infrastructure for speeded-up optimally robust estimation (i.e., MBRE, OMSE, RMXE) for extreme value distributions, extending packages distr, distrEx, distrMod, robustbase, RobAStBase, and ROptEst.
Package: | RobExtremes |
Version: | 1.3.1 |
Date: | 2024-09-04 |
Title: | Optimally Robust Estimation for Extreme Value Distributions |
Description: | Optimally robust estimation for extreme value distributions using S4 classes and methods |
(based on packages distr, distrEx, distrMod, RobAStBase, and ROptEst). | |
Depends: | R(>= 3.4), methods, distrMod(>= 2.8.0), ROptEst(>= 1.2.0), robustbase, evd |
Suggests: | RUnit(>= 0.4.26), ismev(>= 1.39) |
Imports: | RobAStRDA, distr, distrEx(>= 2.8.0), RandVar, RobAStBase(>= 1.2.0), startupmsg,actuar |
Authors: | Bernhard Spangl [contributed smoothed grid values of the Lagrange multipliers] |
Sascha Desmettre [contributed smoothed grid values of the Lagrange multipliers] | |
Eugen Massini [contributed an interactive smoothing routine for smoothing the | |
Lagrange multipliers and smoothed grid values of the Lagrange multipliers] | |
Daria Pupashenko [contributed MDE-estimation for GEV distribution in the framework of | |
her PhD thesis 2011--14] | |
Gerald Kroisandt [contributed testing routines] | |
Nataliya Horbenko ["aut","cph"] | |
Matthias Kohl ["aut", "cph"] | |
Peter Ruckdeschel ["cre", "aut", "cph"], | |
Contact: | [email protected] |
ByteCompile: | yes |
LazyLoad: | yes |
License: | LGPL-3 |
URL: | https://r-forge.r-project.org/projects/robast/ |
Encoding: | UTF-8 |
VCS/SVNRevision: | 1318 |
Importing from packages actuar, evd, it provides S4 classes and methods for the
Gumbel distribution
Generalized Extreme Value distribution (GEVD)
Generalized Pareto distribution (GPD)
Pareto distribution
These distributions come together with particular methods for expectations. I.e., a functional E() as in package distrEx, which as first argument takes the distribution, and, optionally, can take as second argument a function which then is used as integrand. These particular methods are available for the GPD, Pareto, Gamma, Weibull, and GEV disdribution and use integration on the quantile scale, i.e.,
where is the quantile function of X.
In addition, where they exist, we provide closed from expressions for
variances, median, IQR, skewness, kurtosis.
In addition, extending estimators Sn
and Qn
from package
robustbase, we provide functionals for Sn and Qn. A new
asymmetric version of the mad
, kMAD
gives yet another robust
scale estimator (and functional).
As to models, we provide the
GPD model (with known threshold), together with (speeded-up) optimally
robust estimators, with LDEstimators (in general, and with medkMAD
,
medSn
and medQn
as particular ones) and Pickands' estimator as
starting estimators.
GEVD model (with known or unknown threshold), together with (speeded-up) optimally robust estimators, with LDEstimators (see above) and Pickands' estimator as starting estimators.
Pareto model
Weibull model
Gamma model
and for each of these, we provide speeded-up optimally robust estimation
(i.e., MBRE, OMSE, RMXE).
We robust (high-breakdown) starting estimators for
GPD (PickandsEstimator, medkMAD, medSn, medQn)
GEV (PickandsEstimator)
Pareto (Cramér-von-Mises-Minimum-Distance-Estimator)
Weibull (the quantile based estimator of Boudt/Caliskan/Croux)
Gamma (Cramér-von-Mises-Minimum-Distance-Estimator)
For all these families, of course, MLEs and Minimum-Distance-Estimators are also available through package "distrMod".
We bridge to the diagnostics provided by package "ismev", i.e. our
return objects can be plugged into the diagnostics of this package.
We have the usual diagnostic plots from package "RobAStBase",
i.e.
Outylingness plots outlyingPlotIC
IC plots plot
Information plots via infoPlot
IC comparison plots via comparePlot
Cniperpoint plots (from package "ROptEst") via CniperPointPlot
but also (adopted from package "distrMod")
qqplots (with confidence bands) via qqplot
returnlevel plots via returnlevelplot
As a starting point you may look at the included script
‘"RobFitsAtRealData.R"’ in the scripts folder of the package,
accessible by
file.path(system.file(package="RobExtremes"),
"scripts/RobFitsAtRealData.R")
.
[*]: there is a generating function with the same name in RobExtremes [**]: generating function from distrMod, but with (speeded-up) opt.rob-estimators in RobExtremes ########################## Distribution Classes ########################## "Distribution" (from distr) |>"UnivariateDistribution" (from distr) |>|>"AbscontDistribution" (from distr) |>|>|>"Gumbel" [*] |>|>|>"Pareto" [*] |>|>|>"GPareto" [*] |>|>|>"GEVD" [*] ########################## Parameter Classes ########################## "OptionalParameter" (from distr) |>"Parameter" (from distr) |>|>"GumbelParameter" |>|>"ParetoParameter" |>|>"GEVDParameter" |>|>"GParetoParameter" ########################## ProbFamily classes ########################## slots: [<name>(<class>)] "ProbFamily" (from distrMod) |>"ParamFamily" (from distrMod) |>|>"L2ParamFamily" (from distrMod) |>|>|>"L2GroupParamFamily" (from distrMod) |>|>|>|>"ParetoFamily" [*] |>|>|>|>"L2ScaleShapeUnion" (from distrMod) |>|>|>|>|>"GammaFamily" [**] |>|>|>|>|>"GParetoFamily" [*] |>|>|>|>|>"GEVFamily" [*] |>|>|>|>|>"WeibullFamily" [**] |>|>|>|>"L2LocationScaleUnion" /VIRTUAL/ (from distrMod) |>|>|>|>|>"L2LocationFamily" (from distrMod) |>|>|>|>|>|>"GumbelLocationFamily" [*] |>|>|>|>"L2LocScaleShapeUnion" /VIRTUAL/ (from distrMod) |>|>|>|>|>"GEVFamilyMuUnknown" [*]
LDEstimator Estimators for scale-shape models based on location and dispersion medSn loc=median disp=Sn medQn loc=median disp=Qn medkMAD loc=median disp=kMAD asvarMedkMAD [asy. variance to MedkMADE] PickandsEstimator PickandsEstimator asvarPickands [asy. variance to PickandsE] QuantileBCCEstimator Quantile based estimator for the Weibull distribution asvarQBCC [asy. variance to QuantileBCCE]
Distribution Classes Gumbel Generating function for Gumbel-class GEVD Generating function for GEVD-class GPareto Generating function for GPareto-class Pareto Generating function for Pareto-class L2Param Families ParetoFamily Generating function for ParetoFamily-class GParetoFamily Generating function for GParetoFamily-class GEVFamily Generating function for GEVFamily-class WeibullFamily Generating function for WeibullFamily-class
Functionals: E Generic function for the computation of (conditional) expectations var Generic functions for the computation of functionals IQR Generic functions for the computation of functionals median Generic functions for the computation of functionals skewness Generic functions for the computation of functionals kurtosis Generic functions for the computation of functionals Sn Generic function for the computation of (conditional) expectations Qn Generic functions for the computation of functionals
EULERMASCHERONICONSTANT APERYCONSTANT
This package is joint work by Peter Ruckdeschel, Matthias Kohl, and Nataliya Horbenko (whose PhD thesis went into this package to a large extent), with contributions by Dasha Pupashenko, Misha Pupashenko, Gerald Kroisandt, Eugen Massini, Sascha Desmettre, and Bernhard Spangl, in the framework of project "Robust Risk Estimation" (2011-2016) funded by Volkswagen foundation (and gratefully ackknowledged). Thanks also goes to the maintainers of CRAN, in particully to Uwe Ligges who greatly helped us with finding an appropriate way to store the database of interpolating functions which allow the speed up – this is now package RobAStRDA on CRAN.
You may suppress the start-up banner/message completely by setting
options("StartupBanner"="off")
somewhere before loading this package by
library
or require
in your R-code / R-session.
If option "StartupBanner"
is not defined (default) or setting
options("StartupBanner"=NULL)
or
options("StartupBanner"="complete")
the complete start-up banner is
displayed.
For any other value of option "StartupBanner"
(i.e., not in
c(NULL,"off","complete")
) only the version information is displayed.
The same can be achieved by wrapping the library
or require
call
into either suppressStartupMessages()
or
onlytypeStartupMessages(.,atypes="version")
.
As for general packageStartupMessage
's, you may also suppress all
the start-up banner by wrapping the library
or require
call into suppressPackageStartupMessages()
from
startupmsg-version 0.5 on.
Note: The first two numbers of package versions do not necessarily reflect package-individual development, but rather are chosen for the RobAStXXX family as a whole in order to ease updating "depends" information.
Peter Ruckdeschel [email protected],
Matthias Kohl [email protected], and
Nataliya Horbenko [email protected],
Maintainer: Peter Ruckdeschel [email protected]
Horbenko, N., Ruckdeschel, P., and Bae, T. (2011): Robust Estimation of Operational Risk.
Journal of Operational Risk 6(2), 3-30.
M. Kohl (2005). Numerical Contributions to the Asymptotic Theory of Robustness.
Dissertation. University of Bayreuth. https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
M. Kohl, P. Ruckdeschel, and H. Rieder (2010). Infinitesimally Robust Estimation in
General Smoothly Parametrized Models. Statistical Methods and Applications 19(3): 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4), 762–791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
Ruckdeschel, P., Kohl, M., Stabla, T., and Camphausen, F. (2006):
S4 Classes for Distributions, R News, 6(2), 2-6.
https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf.
A vignette for packages distr, distrSim, distrTEst,
and RobExtremes is included into the mere documentation package distrDoc
and may be called by require("distrDoc");vignette("distr")
.
A homepage to this package is available under http://robast.r-forge.r-project.org/.
distr-package
,
distrEx-package
,
distrMod-package
,
RobAStBase-package
,
ROptEst-package
.checkEstClassForParamFamily-methods
PFam |
a parametric family. |
estimator |
an estimator. |
The respective methods can be used to cast an estimator to a model-specific subclass with particular methods.
The GParetoFamily,Estimate
-method returns the estimator cast to
S4 class GPDEstimate
,
the GParetoFamily,LDEstimate
-method cast to
S4 class GPDLDEstimate
,
the GParetoFamily,MCEstimate
-method cast to
S4 class GPDMCEstimate
,
the GParetoFamily,kStepEstimate
-method cast to
S4 class GPDkStepEstimate
,
the GParetoFamily,ORobEstimate
-method cast to
S4 class GPDORobEstimate
,
the GParetoFamily,MDEstimate
-method cast to
S4 class GPDMDEstimate
,
the GParetoFamily,MLEstimate
-method cast to
S4 class GPDML.ALEstimate
,
the GParetoFamily,CvMMDEstimate
-method cast to
S4 class GPDCvMMD.ALEstimate
,
The GEVFamily,Estimate
-method returns the estimator cast to
S4 class GEVEstimate
,
the GEVFamily,LDEstimate
-method cast to
S4 class GEVLDEstimate
,
the GEVFamily,MCEstimate
-method cast to
S4 class GEVMCEstimate
,
the GEVFamily,kStepEstimate
-method cast to
S4 class GEVkStepEstimate
,
the GEVFamily,ORobEstimate
-method cast to
S4 class GEVORobEstimate
,
the GEVFamily,MDEstimate
-method cast to
S4 class GEVMDEstimate
,
the GEVFamily,MLEstimate
-method cast to
S4 class GEVML.ALEstimate
,
the GEVFamily,CvMMDEstimate
-method cast to
S4 class GEVCvMMD.ALEstimate
,
the GEVFamilyMuUnknown,Estimate
-method cast to
S4 class GEVEstimate
,
the GEVFamilyMuUnknown,LDEstimate
-method cast to
S4 class GEVLDEstimate
,
the GEVFamilyMuUnknown,MCEstimate
-method cast to
S4 class GEVMCEstimate
,
the GEVFamilyMuUnknown,kStepEstimate
-method cast to
S4 class GEVkStepstimate
.
the GEVFamilyMuUnknown,ORobEstimate
-method cast to
S4 class GEVORobEstimate
,
the GEVFamilyMuUnknown,MDEstimate
-method cast to
S4 class GEVMDEstimate
,
the GEVFamilyMuUnknown,MLEstimate
-method cast to
S4 class GEVML.ALEstimate
,
the GEVFamilyMuUnknown,CvMMDEstimate
-method cast to
S4 class GEVCvMMD.ALEstimate
.
Peter Ruckdeschel [email protected]
Function asvarMedkMAD
computes the asymptotic (co)variance of
a MedkMAD estimator at a Scale-Shape model.
asvarMedkMAD( model, k=1)
asvarMedkMAD( model, k=1)
model |
an object of class |
k |
numeric (>0); additional parameter for |
For the Generalized Pareto Family all terms are analytic; in case of the general scale-shape model, numerical integration is used.
A 2x2 matrix; the covariance.
Peter Ruckdeschel [email protected]
Ruckdeschel, P. and Horbenko, N. (2011): Optimally-Robust Estimators in Generalized
Pareto Models. ArXiv 1005.1476. To appear at Statistics.
DOI: 10.1080/02331888.2011.628022.
GP <- GParetoFamily(scale=1,shape=0.7) asvarMedkMAD(GP,k=1) ## for didactical purposes turn GP into a non-GPD setClass("noGP",contains="L2ScaleShapeUnion") GP2 <- GP class(GP2) <- "noGP" asvarMedkMAD(GP2,k=1) ### uses numerical integration
GP <- GParetoFamily(scale=1,shape=0.7) asvarMedkMAD(GP,k=1) ## for didactical purposes turn GP into a non-GPD setClass("noGP",contains="L2ScaleShapeUnion") GP2 <- GP class(GP2) <- "noGP" asvarMedkMAD(GP2,k=1) ### uses numerical integration
Function asvarPickands
computes the asymptotic (co)variance of
a Pickands estimator at a GPD or GEVD model – the latter with location
mu known or unknown.
asvarPickands( model, alpha=2)
asvarPickands( model, alpha=2)
model |
an object of class |
alpha |
numeric > 1; determines the variant of the Pickands-Estimator
based on matching the empirical |
All terms are analytic.
A 2x2 matrix (resp., for mu unknown in the GEV model a 3x3 matrix); the covariance.
Peter Ruckdeschel [email protected]
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics 47(4), 762–791.
DOI: 10.1080/02331888.2011.628022.
GP <- GParetoFamily(scale=1,shape=0.7) asvarPickands(GP) asvarPickands(GP,alpha=2.3) GE <- GEVFamily(loc=0,scale=1,shape=0.7) asvarPickands(GE) GE0 <- GEVFamilyMuUnknown(loc=0,scale=1,shape=0.7) asvarPickands(GE0)
GP <- GParetoFamily(scale=1,shape=0.7) asvarPickands(GP) asvarPickands(GP,alpha=2.3) GE <- GEVFamily(loc=0,scale=1,shape=0.7) asvarPickands(GE) GE0 <- GEVFamilyMuUnknown(loc=0,scale=1,shape=0.7) asvarPickands(GE0)
Function asvarQBCC
computes the asymptotic (co)variance of
a QuantileBCC estimator at a Weibull model.
asvarQBCC( model, p1 = 1/3, p2 = 2/3)
asvarQBCC( model, p1 = 1/3, p2 = 2/3)
model |
an object of class |
p1 , p2
|
levels of the quantiles; maximal breakdown point is achieved
for |
All terms are analytic.
A 2x2 matrix; the covariance.
Peter Ruckdeschel [email protected]
GP <- WeibullFamily(scale=1,shape=0.7) asvarQBCC(GP) asvarQBCC(GP, p1=1/4, p2= 5/8)
GP <- WeibullFamily(scale=1,shape=0.7) asvarQBCC(GP) asvarQBCC(GP, p1=1/4, p2= 5/8)
checkIC
checks accuracy of the centering
and Fisher consistency condition of an IC, makeIC
,
by centering and restandardizing warrants these conditions.
signature(IC="IC", L2Fam = "ParetoFamily")
:
To enhance accuracy, the method for "ParetoFamily"
uses
integration via the quantile transform, i.e.,
for a random variable
with quantil function
is computed as
signature(IC="IC", L2Fam = "GParetoFamily")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GParetoFamily"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "GEVFamily")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GEVFamily"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "GEVFamilyMuUnknown")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GEVFamilyMuUnknown"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "ParetoFamily")
:
As with "checkIC"
, to enhance accuracy,
the method for "makeIC"
for "ParetoFamily"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "GParetoFamily")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GParetoFamily"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "GEVFamily")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GEVFamily"
uses
integration via the quantile transform.
signature(IC="IC", L2Fam = "GEVFamilyMuUnknown")
:
As for "ParetoFamily"
, to enhance accuracy,
the method for "GEVFamilyMuUnknown"
uses
integration via the quantile transform.
Peter Ruckdeschel [email protected]
Generic function for the computation of (conditional) expectations.
E(object, fun, cond, ...) ## S4 method for signature 'GEV,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature ## 'DistributionsIntegratingByQuantiles,function,missing' E(object, fun, low = NULL, upp = NULL, rel.tol= getdistrExOption("ErelativeTolerance"), lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE) ## S4 method for signature 'Gumbel,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature 'GPareto,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature 'GPareto,function,missing' E(object, fun, low = NULL, upp = NULL, rel.tol= getdistrExOption("ErelativeTolerance"), lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE) ## S4 method for signature 'Pareto,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
E(object, fun, cond, ...) ## S4 method for signature 'GEV,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature ## 'DistributionsIntegratingByQuantiles,function,missing' E(object, fun, low = NULL, upp = NULL, rel.tol= getdistrExOption("ErelativeTolerance"), lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE) ## S4 method for signature 'Gumbel,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature 'GPareto,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE) ## S4 method for signature 'GPareto,function,missing' E(object, fun, low = NULL, upp = NULL, rel.tol= getdistrExOption("ErelativeTolerance"), lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), IQR.fac = max(1e4,getdistrExOption("IQR.fac")), ..., diagnostic = FALSE) ## S4 method for signature 'Pareto,missing,missing' E(object, low = NULL, upp = NULL, ..., diagnostic = FALSE)
object |
object of class |
fun |
if missing the (conditional) expectation is computed
else the (conditional) expection of |
cond |
if not missing the conditional expectation
given |
rel.tol |
relative tolerance for |
low |
lower bound of integration range. |
upp |
upper bound of integration range. |
lowerTruncQuantile |
lower quantile for quantile based integration range. |
upperTruncQuantile |
upper quantile for quantile based integration range. |
IQR.fac |
factor for scale based integration range (i.e.;
median of the distribution |
... |
additional arguments to |
diagnostic |
logical; if |
The precision of the computations can be controlled via
certain global options; cf. distrExOptions
.
Also note that arguments low
and upp
should be given as
named arguments in order to prevent them to be matched by arguments
fun
or cond
. Also the result, when arguments
low
or upp
is given, is the unconditional value of the
expectation; no conditioning with respect to low <= object <= upp
is done. To be able to use integration after transformation via the
respective probability transformation to [0,1], we introduce a class union
"DistributionsIntegratingByQuantiles"
, which currently comprises
classes "GPareto"
, "Pareto"
, "Weibull"
, "GEV"
.
In addition, the specific method for "GPareto", "function", "missing"
uses integration on [0,1] via the substitution method (y := log(x)).
Diagnostics on the involved integrations are available
if argument diagnostic
is TRUE
. Then there is attribute
diagnostic
attached to the return value, which may be inspected
and accessed through showDiagnostic
and
getDiagnostic
.
The expectation is computed.
exact evaluation using explicit expressions.
exact evaluation using explicit expressions.
use probability transform, i.e., a substitution y = p(object)(x)
for numerical integration.
use substitution method (y := log(x)) for numerical integration.
exact evaluation using explicit expressions.
Matthias Kohl [email protected] and Peter Ruckdeschel [email protected]
distrExIntegrate
, m1df
, m2df
,
Distribution-class
GP <- GPareto(shape=0.3) E(GP) E(GP, fun = function(x){2*x^2}) ## uses the log trafo P <- Pareto() E(P) E(P,fun = function(x){1/(x^2+1)})
GP <- GPareto(shape=0.3) E(GP) E(GP, fun = function(x){2*x^2}) ## uses the log trafo P <- Pareto() E(P) E(P,fun = function(x){1/(x^2+1)})
Functions to compute Value-at-Risk (VaR), Conditional Value-at-Risk (CVaR) and Expected Loss (EL) at data from scale-shape families.
getVaR(data, model, level, rob=TRUE) getCVaR(data, model, level, rob=TRUE) getEL(data, model, N0, rob=TRUE) ## S3 method for class 'riskMeasure' print(x, level=NULL, ...)
getVaR(data, model, level, rob=TRUE) getCVaR(data, model, level, rob=TRUE) getEL(data, model, N0, rob=TRUE) ## S3 method for class 'riskMeasure' print(x, level=NULL, ...)
data |
data at which to compute the risk measure. |
model |
an object of class |
level |
real: probability needed for VaR and CVaR. |
N0 |
real: expected frequency for expected loss. |
rob |
logical; if |
x |
an object of (S3-)class |
... |
further arguments for |
The risk measures getVaR
, getCVaR
, getEL
return
an (S3) object of class "riskMeasure"
, i.e., a numeric vector
of length 2 with components "Risk"
and "varofRisk"
containing the respective risk measure
and a corresponding (asymptotic) standard error for the risk
measure. To the return class "riskMeasure"
,
there is a particular print
-method; if the corresponding argument
level
is NULL
(default) the corresponding standard error
is printed together with the risk measure; otherwise a corresponding
CLT-based confidence interval for the risk meausre is produced.
Peter Ruckdeschel [email protected]
P. Ruckdeschel, N. Horbenko (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics 47(4), 762–791.
doi:10.1080/02331888.2011.628022.
N. Horbenko, P. Ruckdeschel, T. Bae (2011): Robust Estimation of Operational Risk.
Journal of Operational Risk 6(2), 3–30.
GParetoFamily
, GEVFamily
, WeibullFamily
, GammaFamily
# to reduce checking time set.seed(123) GPD <- GParetoFamily(loc=20480, scale=7e4, shape=0.3) data <- r(GPD)(500) getCVaR(data,GPD,0.99) getVaR(data,GPD,0.99) getEL(data,GPD,5) getVaR(data,GPD,0.99, rob=FALSE) getEL(data,GPD,5, rob=FALSE) getCVaR(data,GPD,0.99, rob=FALSE)
# to reduce checking time set.seed(123) GPD <- GParetoFamily(loc=20480, scale=7e4, shape=0.3) data <- r(GPD)(500) getCVaR(data,GPD,0.99) getVaR(data,GPD,0.99) getEL(data,GPD,5) getVaR(data,GPD,0.99, rob=FALSE) getEL(data,GPD,5, rob=FALSE) getCVaR(data,GPD,0.99, rob=FALSE)
getStartIC
computes the optimally-robust IC to be used as
argument ICstart
in kStepEstimator
.
getStartIC(model, risk, ...) ## S4 method for signature 'L2ScaleShapeUnion,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE, ..debug=FALSE, modifyICwarn = NULL) ## S4 method for signature 'L2LocScaleShapeUnion,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE, ..debug=FALSE, modifyICwarn = NULL) ## S4 method for signature 'ParetoFamily,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE)
getStartIC(model, risk, ...) ## S4 method for signature 'L2ScaleShapeUnion,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE, ..debug=FALSE, modifyICwarn = NULL) ## S4 method for signature 'L2LocScaleShapeUnion,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE, ..debug=FALSE, modifyICwarn = NULL) ## S4 method for signature 'ParetoFamily,interpolRisk' getStartIC(model, risk, ..., withMakeIC = FALSE)
model |
normtype of class |
risk |
normtype of class |
... |
further arguments to be passed to specific methods. |
withMakeIC |
logical; if |
..debug |
logical; if |
modifyICwarn |
logical: should a (warning) information be added if
|
getStartIC
is used internally in functions robest
and roptest
to compute the optimally robust influence function
according to the arguments given to them.
An IC of type HampIC
.
signature(model = "L2ScaleShapeUnion", risk = "interpolRisk")
:
computes the optimally robust influence function by interpolation
on a grid (using internal helper function .getPsi
).
signature(model = "L2LocScaleShapeUnion", risk = "interpolRisk")
:
computes the optimally robust influence function by interpolation
on a grid (using internal helper function .getPsi.wL
).
signature(model = "ParetoFamily", risk = "interpolRisk")
:
computes the optimally robust influence function by interpolation
on a grid (using internal helper function .getPsi.P
).
All of these methods recenter and restandardize the obtained ICs to warrant centeredness and Fisher consistency.
Peter Ruckdeschel [email protected]
Generates an object of class "GEV"
.
GEV(loc = 0, scale = 1, shape = 0, location = loc)
GEV(loc = 0, scale = 1, shape = 0, location = loc)
loc |
real number: location parameter of the GEV distribution. |
scale |
positive real number: scale parameter of the GEV distribution |
shape |
non-negative real number: shape parameter of the GEV distribution. |
location |
real number: location of GEV distribution |
Object of class "GEV"
The class "GEV"
is based on the code provided
by the package evd by Alec Stephenson.
Nataliya Horbenko [email protected]
(P1 <- GEV(loc = 0, scale = 1, shape = 0)) plot(P1) E(GEV()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
(P1 <- GEV(loc = 0, scale = 1, shape = 0)) plot(P1) E(GEV()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
[borrowed from evd]:
The GEV distribution function with parameters loc
,
scale
,
shape
is
for , where
. If
the distribution is
defined by continuity and gives the Gumbel distribution.
If
, the value
is either
greater than the upper end point (if
), or less than the lower end
point (if
).
Objects can be created by calls of the form new("GEV", loc, scale,shape)
.
More frequently they are created via the generating function
GEV
.
img
Object of class "Reals"
.
param
Object of class "GEVParameter"
.
r
rgpd
d
dgpd
p
pgpd
, but vectorized and with special treatment of
arguments lower.tail
and log.p
q
qgpd
, but vectorized and with special treatment of
arguments lower.tail
and log.p
gaps
(numeric) matrix or NULL
.withArith
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim
logical: used internally to issue warnings as to accuracy
.logExact
logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExact
logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Class "AbscontDistribution"
, directly.
Class "UnivariateDistribution"
, by class "AbscontDistribution"
.
Class "Distribution"
, by class "AbscontDistribution"
.
signature(.Object = "GEV")
: initialize method.
signature(object = "GEV")
: wrapped access method for
slot shape
of slot param
.
signature(object = "GEV")
: wrapped access method for
slot loc
of slot param
.
signature(object = "GEV")
: alias to loc
,
to support argument naming of package VGAM.
signature(x = "GEV")
: wrapped access method for
slot scale
of slot param
.
signature(object = "GEV")
: wrapped replace method for
slot shape
of slot param
.
signature(object = "GEV")
: wrapped replace method for
slot loc
of slot param
.
signature(object = "GEV")
: alias to loc<-
,
to support argument naming of package VGAM.
signature(x = "GEV")
: wrapped replace method for
slot scale
of slot param
.
signature(e1 = "GEV", e2 = "numeric")
: exact method
for this transformation — stays within this class.
signature(e1 = "GEV", e2 = "numeric")
: exact method
for this transformation — stays within this class if e2>0
.
signature(object = "GEV", fun = "missing", cond = "missing")
:
exact evaluation using explicit expressions.
signature(signature(x = "GEV")
:
exact evaluation using explicit expressions.
signature(signature(x = "GEV")
:
exact evaluation using explicit expressions.
signature(signature(x = "GEV")
:
exact evaluation using explicit expressions.
signature(signature(x = "GEV")
:
exact evaluation using explicit expressions.
signature(signature(x = "GEV")
:
exact evaluation using explicit expressions.
signature(object = "GEV", x = "numeric")
:
checks if x
lies in the support of the respective distribution.
This class is based on the code provided by the package evd by A. G. Stephenson.
Nataliya Horbenko [email protected]
Pickands, J. (1975) Statistical inference using extreme order statistics. _Annals of Statistics_, *3*, 119-131.
dgpd
, AbscontDistribution-class
(P1 <- new("GEV", loc = 0, scale = 1,shape = 0)) plot(P1) shape(P1) loc(P1) scale(P1) <- 4 loc(P1) <- 2 shape(P1) <- -1 # may be negative! plot(P1)
(P1 <- new("GEV", loc = 0, scale = 1,shape = 0)) plot(P1) shape(P1) loc(P1) scale(P1) <- 4 loc(P1) <- 2 shape(P1) <- -1 # may be negative! plot(P1)
Generates an object of class "GEVFamily"
which
represents a Generalized EV family.
GEVFamily(loc = 0, scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE, ..withWarningGEV = TRUE)
GEVFamily(loc = 0, scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE, ..withWarningGEV = TRUE)
loc |
real: known/fixed threshold/location parameter |
scale |
positive real: scale parameter |
shape |
positive real: shape parameter |
of.interest |
character: which parameters, transformations are of interest. |
p |
real or NULL: probability needed for quantile and expected shortfall |
N |
real or NULL: expected frequency for expected loss |
trafo |
matrix or NULL: transformation of the parameter |
start0Est |
startEstimator — if |
withPos |
logical of length 1: Is shape restricted to positive values? |
secLevel |
a numeric of length 1:
In the ideal GEV model, for each observastion |
withCentL2 |
logical: shall L2 derivative be centered by substracting
the E()? Defaults to |
withL2derivDistr |
logical: shall the distribution of the L2 derivative
be computed? Defaults to |
withMDE |
logical: should Minimum Distance Estimators be used to
find a good starting value for the parameter search?
Defaults to |
..ignoreTrafo |
logical: only used internally in |
..withWarningGEV |
logical: shall warnings be issued if shape is large? |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "GEVFamily"
Matthias Kohl [email protected]
Peter Ruckdeschel [email protected]
Nataliya Horbenko [email protected]
Kohl, M. (2005) Numerical Contributions to
the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
Kohl, M., Ruckdeschel, P., and Rieder, H. (2010):
Infinitesimally Robust Estimation in General Smoothly Parametrized Models.
Stat. Methods Appl., 19, 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4),
762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
(G1 <- GEVFamily()) FisherInfo(G1) checkL2deriv(G1)
(G1 <- GEVFamily()) FisherInfo(G1) checkL2deriv(G1)
Generates an object of class "GEVFamilyMuUnknown"
which
represents a Generalized EV family with unknown location parameter mu
.
GEVFamilyMuUnknown(loc = 0, scale = 1, shape = 0.5, of.interest = c("loc", "scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE, ..withWarningGEV = TRUE, ..name = "")
GEVFamilyMuUnknown(loc = 0, scale = 1, shape = 0.5, of.interest = c("loc", "scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE, ..withWarningGEV = TRUE, ..name = "")
loc |
real: known/fixed threshold/location parameter |
scale |
positive real: scale parameter |
shape |
positive real: shape parameter |
of.interest |
character: which parameters, transformations are of interest. |
p |
real or NULL: probability needed for quantile and expected shortfall |
N |
real or NULL: expected frequency for expected loss |
trafo |
matrix or NULL: transformation of the parameter |
start0Est |
startEstimator — if |
withPos |
logical of length 1: Is shape restricted to positive values? |
secLevel |
a numeric of length 1:
In the ideal GEV model, for each observastion |
withCentL2 |
logical: shall L2 derivative be centered by substracting
the E()? Defaults to |
withL2derivDistr |
logical: shall the distribution of the L2 derivative
be computed? Defaults to |
withMDE |
logical: should Minimum Distance Estimators be used to
find a good starting value for the parameter search?
Defaults to |
..ignoreTrafo |
logical: only used internally in |
..withWarningGEV |
logical: shall warnings be issued if shape is large? |
..name |
character: optional alternative name for the parametric family; used in generating interpolating grids. |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "GEVFamilyMuUnknown"
Matthias Kohl [email protected]
Peter Ruckdeschel [email protected]
Nataliya Horbenko [email protected]
Kohl, M. (2005) Numerical Contributions to
the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
Kohl, M., Ruckdeschel, P., and Rieder, H. (2010):
Infinitesimally Robust Estimation in General Smoothly Parametrized Models.
Stat. Methods Appl., 19, 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4),
762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
(G1 <- GEVFamilyMuUnknown()) FisherInfo(G1) checkL2deriv(G1)
(G1 <- GEVFamilyMuUnknown()) FisherInfo(G1) checkL2deriv(G1)
The class of the parameter of generalized Pareto distribution.
Objects can be created by calls of the form new("GEVParameter", ...)
.
loc
real number: location parameter of a GEV distribution.
scale
real number: scale parameter of a GEV distribution.
shape
real number: shape parameter of a GEV distribution.
name
default name is “parameter of a GEV distribution”.
Class "Parameter"
, directly.
Class "OptionalParameter"
, by class "Parameter"
.
signature(object = "GEVParameter")
: access method for
slot loc
.
signature(object = "GEVParameter")
: alias to loc
,
to support argument naming of package VGAM.
signature(object = "GEVParameter")
: access method for
slot scale
.
signature(object = "GEVParameter")
: access method for
slot shape
.
signature(object = "GEVParameter")
: replace method for
slot loc
.
signature(object = "GEVParameter")
: alias to loc<-
,
to support argument naming of package VGAM.
signature(object = "GEVParameter")
: replace method for
slot shape
.
signature(object = "GEVParameter")
: replace method for
slot shape
.
Nataliya Horbenko [email protected]
P <- new("GEVParameter") loc(P) ## same as location(P) scale(P) shape(P) scale(P) <- 2 location(P) <- 4 shape(P) <- -1 # may be negative! P
P <- new("GEVParameter") loc(P) ## same as location(P) scale(P) shape(P) scale(P) <- 2 location(P) <- 4 shape(P) <- -1 # may be negative! P
Generates an object of class "GPareto"
.
GPareto(loc = 0, scale = 1, shape = 0, location = loc)
GPareto(loc = 0, scale = 1, shape = 0, location = loc)
loc |
real number: location parameter of the GPareto distribution. |
scale |
positive real number: scale parameter of the GPareto distribution |
shape |
non-negative real number: shape parameter of the GPareto distribution. |
location |
alternative argument name for argument 'loc' — to support argument names of package VGAM. |
Object of class "GPareto"
The class "GPareto"
is based on the code provided
by the package evd by Alec Stephenson.
Nataliya Horbenko [email protected]
(P1 <- GPareto(loc = 1, scale = 1, shape = -0.5)) plot(P1) E(GPareto()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
(P1 <- GPareto(loc = 1, scale = 1, shape = -0.5)) plot(P1) E(GPareto()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
[borrowed from evd]:
The (Three-parameter) generalized Pareto distribution with parameter loc
,
scale
,
shape
has density:
for (
) and
(
).
Objects can be created by calls of the form new("GPareto", loc, scale,shape)
.
More frequently they are created via the generating function
GPareto
.
img
Object of class "Reals"
.
param
Object of class "GParetoParameter"
.
r
rgpd
d
dgpd
p
pgpd
, but vectorized and with special treatment of
arguments lower.tail
and log.p
q
qgpd
, but vectorized and with special treatment of
arguments lower.tail
and log.p
gaps
(numeric) matrix or NULL
.withArith
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim
logical: used internally to issue warnings as to accuracy
.logExact
logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExact
logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Class "AbscontDistribution"
, directly.
Class "UnivariateDistribution"
, by class "AbscontDistribution"
.
Class "Distribution"
, by class "AbscontDistribution"
.
signature(.Object = "GPareto")
: initialize method.
signature(object = "GPareto")
: wrapped access method for
slot shape
of slot param
.
signature(object = "GPareto")
: wrapped access method for
slot loc
of slot param
.
signature(object = "GPareto")
: alias to loc
,
to support argument naming of package VGAM.
signature(x = "GPareto")
: wrapped access method for
slot scale
of slot param
.
signature(object = "GPareto")
: wrapped replace method for
slot shape
of slot param
.
signature(object = "GPareto")
: wrapped replace method for
slot loc
of slot param
.
signature(object = "GPareto")
: alias to loc<-
,
to support argument naming of package VGAM.
signature(x = "GPareto")
: wrapped replace method for
slot scale
of slot param
.
signature(e1 = "GPareto", e2 = "numeric")
: exact method
for this transformation — stays within this class.
signature(e1 = "GPareto", e2 = "numeric")
: exact method
for this transformation — stays within this class if e2>0
.
signature(object = "GPareto", fun = "missing", cond = "missing")
:
exact evaluation using explicit expressions.
signature(signature(x = "GPareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "GPareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "GPareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "GPareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "GPareto")
:
exact evaluation using explicit expressions.
signature(object = "GPareto", x = "numeric")
:
checks if x
lies in the support of the respective distribution.
This class is based on the code provided by the package evd by A. G. Stephenson.
Nataliya Horbenko [email protected]
Pickands, J. (1975) Statistical inference using extreme order statistics. _Annals of Statistics_, *3*, 119-131.
dgpd
, AbscontDistribution-class
(P1 <- new("GPareto", loc = 0, scale = 1,shape = 0)) plot(P1) shape(P1) loc(P1) scale(P1) <- 4 location(P1) <- 2 ## same as loc(P1) <- 2 shape(P1) <- -2 # may be negative plot(P1)
(P1 <- new("GPareto", loc = 0, scale = 1,shape = 0)) plot(P1) shape(P1) loc(P1) scale(P1) <- 4 location(P1) <- 2 ## same as loc(P1) <- 2 shape(P1) <- -2 # may be negative plot(P1)
Generates an object of class "GParetoFamily"
which
represents a Generalized Pareto family.
GParetoFamily(loc = 0, scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE)
GParetoFamily(loc = 0, scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, secLevel = 0.7, withCentL2 = FALSE, withL2derivDistr = FALSE, withMDE = FALSE, ..ignoreTrafo = FALSE)
loc |
real: known/fixed threshold/location parameter |
scale |
positive real: scale parameter |
shape |
positive real: shape parameter |
of.interest |
character: which parameters, transformations are of interest. |
p |
real or NULL: probability needed for quantile and expected shortfall |
N |
real or NULL: expected frequency for expected loss |
trafo |
matrix or NULL: transformation of the parameter |
start0Est |
startEstimator — if |
withPos |
logical of length 1: Is shape restricted to positive values? |
secLevel |
a numeric of length 1:
In the ideal GEV model, for each observastion |
withCentL2 |
logical: shall L2 derivative be centered by substracting
the E()? Defaults to |
withL2derivDistr |
logical: shall the distribution of the L2 derivative
be computed? Defaults to |
withMDE |
logical: should Minimum Distance Estimators be used to
find a good starting value for the parameter search?
Defaults to |
..ignoreTrafo |
logical: only used internally in |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "GParetoFamily"
Matthias Kohl [email protected]
Peter Ruckdeschel [email protected]
Nataliya Horbenko [email protected]
Kohl, M. (2005) Numerical Contributions to
the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
Kohl, M., Ruckdeschel, P., and Rieder, H. (2010):
Infinitesimally Robust Estimation in General Smoothly Parametrized Models.
Stat. Methods Appl., 19, 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4),
762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
(G1 <- GParetoFamily()) FisherInfo(G1) checkL2deriv(G1)
(G1 <- GParetoFamily()) FisherInfo(G1) checkL2deriv(G1)
The class of the parameter of generalized Pareto distribution.
Objects can be created by calls of the form new("GParetoParameter", ...)
.
loc
real number: location parameter of a generalized Pareto distribution.
scale
real number: scale parameter of a generalized Pareto distribution.
shape
real number: shape parameter of a generalized Pareto distribution.
name
default name is “parameter of a GPareto distribution”.
Class "Parameter"
, directly.
Class "OptionalParameter"
, by class "Parameter"
.
signature(object = "GParetoParameter")
: access method for
slot loc
.
signature(object = "GParetoParameter")
: alias to loc
,
to support argument naming of package VGAM.
signature(object = "GParetoParameter")
: access method for
slot scale
.
signature(object = "GParetoParameter")
: access method for
slot shape
.
signature(object = "GParetoParameter")
: replace method for
slot loc
.
signature(object = "GParetoParameter")
: alias to loc<-
,
to support argument naming of package VGAM.
signature(object = "GParetoParameter")
: replace method for
slot shape
.
signature(object = "GParetoParameter")
: replace method for
slot shape
.
Nataliya Horbenko [email protected]
GPareto-class
, Parameter-class
P <- new("GParetoParameter") loc(P) ## same as location(P) scale(P) shape(P) scale(P) <- 2 loc(P) <- -5 shape(P) <- -1 # may be negative P
P <- new("GParetoParameter") loc(P) ## same as location(P) scale(P) shape(P) scale(P) <- 2 loc(P) <- -5 shape(P) <- -1 # may be negative P
Generates an object of class "Gumbel"
.
Gumbel(loc = 0, scale = 1)
Gumbel(loc = 0, scale = 1)
loc |
real number: location parameter of the Gumbel distribution. |
scale |
positive real number: scale parameter of the Gumbel distribution |
Object of class "Gumbel"
The class "Gumbel"
is based on the code provided
by the package evd.
Matthias Kohl [email protected]
(G1 <- Gumbel(loc = 1, scale = 2)) plot(G1) loc(G1) scale(G1) loc(G1) <- -1 scale(G1) <- 2 plot(G1) E(Gumbel()) # Euler's constant E(G1, function(x){x^2}) ## The function is currently defined as function(loc = 0, scale = 1){ new("Gumbel", loc = loc, scale = scale) }
(G1 <- Gumbel(loc = 1, scale = 2)) plot(G1) loc(G1) scale(G1) loc(G1) <- -1 scale(G1) <- 2 plot(G1) E(Gumbel()) # Euler's constant E(G1, function(x){x^2}) ## The function is currently defined as function(loc = 0, scale = 1){ new("Gumbel", loc = loc, scale = scale) }
The Gumbel cumulative distribution function with
location parameter loc
and scale
parameter
scale
is
for all real x, where ;
c.f.
rgumbel
. This distribution is also known as
extreme value distribution of type I; confer Chapter~22 of
Johnson et al. (1995).
Objects can be created by calls of the form new("Gumbel", loc, scale)
.
More frequently they are created via the generating function
Gumbel
.
img
Object of class "Reals"
.
param
Object of class "GumbelParameter"
.
r
rgumbel
d
dgumbel
p
pgumbel
q
qgumbel
gaps
(numeric) matrix or NULL
.withArith
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim
logical: used internally to issue warnings as to accuracy
.logExact
logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExact
logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Symmetry
object of class "DistributionSymmetry"
;
used internally to avoid unnecessary calculations.
Class "AbscontDistribution"
, directly.
Class "UnivariateDistribution"
, by class "AbscontDistribution"
.
Class "Distribution"
, by class "AbscontDistribution"
.
signature(.Object = "Gumbel")
: initialize method.
signature(object = "Gumbel")
: wrapped access method for
slot loc
of slot param
.
signature(x = "Gumbel")
: wrapped access method for
slot scale
of slot param
.
signature(object = "Gumbel")
: wrapped replace method for
slot loc
of slot param
.
signature(x = "Gumbel")
: wrapped replace method for
slot scale
of slot param
.
+
signature(e1 = "Gumbel", e2 = "numeric")
: result again of
class "Gumbel"
; exact.
*
signature(e1 = "Gumbel", e2 = "numeric")
: result again of
class "Gumbel"
; exact.
signature(object = "Gumbel", fun = "missing", cond = "missing")
:
exact evaluation of expectation using explicit expressions.
signature(x = "Gumbel")
:
exact evaluation of expectation using explicit expressions.
signature(x = "Gumbel")
:
exact evaluation of expectation using explicit expressions.
signature(x = "Gumbel")
:
exact evaluation of expectation using explicit expressions.
signature(x = "Gumbel")
:
exact evaluation of expectation using explicit expressions.
signature(x = "Gumbel")
:
exact evaluation of expectation using explicit expressions.
signature(object = "Gumbel", x = "numeric")
:
checks if x
lies in the support of the respective distribution.
This class is based on the code provided by the package evd.
Matthias Kohl [email protected]
Johnson et al. (1995) Continuous Univariate Distributions. Vol. 2. 2nd ed. New York: Wiley.
rgumbel
, AbscontDistribution-class
(G1 <- new("Gumbel", loc = 1, scale = 2)) plot(G1) loc(G1) scale(G1) loc(G1) <- -1 scale(G1) <- 2 plot(G1)
(G1 <- new("Gumbel", loc = 1, scale = 2)) plot(G1) loc(G1) scale(G1) loc(G1) <- -1 scale(G1) <- 2 plot(G1)
Generates an object of class "L2LocationFamily"
which
represents a Gumbel location family.
GumbelLocationFamily(loc = 0, scale = 1, trafo)
GumbelLocationFamily(loc = 0, scale = 1, trafo)
loc |
location parameter |
scale |
scale parameter |
trafo |
function in |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "L2LocationFamily"
Matthias Kohl [email protected]
Kohl, M. (2005) Numerical Contributions to the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
L2ParamFamily-class
, Gumbel-class
##current implementation is: theta <- 0 names(theta) <- "loc" GL <- ParamFamily(name = "Gumbel location family", param = ParamFamParameter(name = "location parameter", main = theta), startPar = function(x,...) c(min(x),max(x)), distribution = Gumbel(loc = 0, scale = 1), ## scale known! modifyParam = function(theta){ Gumbel(loc = theta, scale = 1) }, props = paste(c("The Gumbel location family is invariant under", "the group of transformations 'g(x) = x + loc'", "with location parameter 'loc'"), collapse = " ")) GL (G1 <- GumbelLocationFamily()) plot(G1) Map(L2deriv(G1)[[1]]) checkL2deriv(G1)
##current implementation is: theta <- 0 names(theta) <- "loc" GL <- ParamFamily(name = "Gumbel location family", param = ParamFamParameter(name = "location parameter", main = theta), startPar = function(x,...) c(min(x),max(x)), distribution = Gumbel(loc = 0, scale = 1), ## scale known! modifyParam = function(theta){ Gumbel(loc = theta, scale = 1) }, props = paste(c("The Gumbel location family is invariant under", "the group of transformations 'g(x) = x + loc'", "with location parameter 'loc'"), collapse = " ")) GL (G1 <- GumbelLocationFamily()) plot(G1) Map(L2deriv(G1)[[1]]) checkL2deriv(G1)
The class of the parameter of Gumbel distributions.
Objects can be created by calls of the form new("GumbelParameter", ...)
.
loc
real number: location parameter of a Gumbel distribution.
scale
positive real number: scale parameter of a Gumbel distribution.
name
default name is “parameter of a Gumbel distribution”.
Class "Parameter"
, directly.
Class "OptionalParameter"
, by class "Parameter"
.
signature(object = "GumbelParameter")
: access method for
slot loc
.
signature(x = "GumbelParameter")
: access method for
slot scale
.
signature(object = "GumbelParameter")
: replace method for
slot loc
.
signature(x = "GumbelParameter")
: replace method for
slot scale
.
Matthias Kohl [email protected]
new("GumbelParameter")
new("GumbelParameter")
S4 classes for return values of estimators in package RobExtremes defined for internal purposes.
The S4 classes described here are GPDEstimate
, GEVEstimate
,
GPDMCEstimate
, GEVMCEstimate
,
GPDMDEstimate
, GEVMDEstimate
,
GPDLDEstimate
, GEVLDEstimate
,
GPDkStepEstimate
, GEVkStepEstimate
,
GPDORobEstimate
, GEVORobEstimate
,
GPDML.ALEstimate
, GEVML.ALEstimate
,
GPDCvMMD.ALEstimate
, GEVCvMMD.ALEstimate
.
These classes are used internally to provide specific S4 methods for different estimators later on; thus, there are no generating functions.
All slots are inherited from parent classes.
Classes GPDEstimate
, GEVEstimate
extend class Estimate
,
directly.
Class GPDMCEstimate
extends classes GPDEstimate
,
MCEstimate
, directly.
Class GEVMCEstimate
extends classes GEVEstimate
,
MCEstimate
, directly.
Class GPDMDEstimate
extends classes GPDEstimate
,
MDEstimate
, directly.
Class GEVMDEstimate
extends classes GEVEstimate
,
MDEstimate
, directly.
Class GPDMCALEstimate
extends classes GPDEstimate
,
MCALEstimate
, directly.
Class GEVMCALEstimate
extends classes GEVEstimate
,
MCALEstimate
, directly.
Class GPDLDEstimate
extends classes GPDEstimate
,
LDEstimate
, directly.
Class GEVLDEstimate
extends classes GEVEstimate
,
LDEstimate
, directly.
Class GPDkStepEstimate
extends classes GPDEstimate
,
kStepEstimate
, directly.
Class GEVkStepEstimate
extends classes GEVEstimate
,
kStepEstimate
, directly.
Class GPDORobEstimate
extends classes GPDkStepEstimate
,
ORobEstimate
, directly.
Class GEVORobEstimate
extends classes GEVkStepEstimate
,
ORobEstimate
, directly.
Class GPDML.ALEstimate
extends classes GPDEstimate
,
ML.ALEstimate
, directly.
Class GEVML.ALEstimate
extends classes GEVEstimate
,
ML.ALEstimate
, directly.
Class GPDCvMMD.ALEstimate
extends classes GPDEstimate
,
CvMMD.ALEstimate
, directly.
Class GEVCvMMD.ALEstimate
extends classes GEVEstimate
,
CvMMD.ALEstimate
, directly.
Peter Ruckdeschel [email protected]
Estimate-class
,
MCEstimate-class
,
kStepEstimate-class
,
LDEstimate-class
Function LDEstimator
provides a general way to compute
estimates for a given parametric family of probability measures
(with a scale and shape parameter) which
can be obtained by matching location and dispersion functionals
against empirical counterparts.
getShapeGrid(gridsize=1000, centralvalue=0.7, withPos=TRUE, cutoff.at.0=1e-4, fac = 2) getSnGrid(xiGrid = getShapeGrid(), PFam=GParetoFamily(), low=0, upp=1.01, accuracy = 10000, GridFileName="SnGrid.Rdata", withPrint = FALSE)
getShapeGrid(gridsize=1000, centralvalue=0.7, withPos=TRUE, cutoff.at.0=1e-4, fac = 2) getSnGrid(xiGrid = getShapeGrid(), PFam=GParetoFamily(), low=0, upp=1.01, accuracy = 10000, GridFileName="SnGrid.Rdata", withPrint = FALSE)
gridsize |
integer; the size of the grid to be created. |
centralvalue |
numeric of length 1: the central value of the grid (for details see below). |
withPos |
logical of length 1; are negative values for the shape forbidden? |
cutoff.at.0 |
numeric of length 1: How close may we come to 0? |
fac |
a scaling factor used for the respective grid values (see below). |
xiGrid |
numeric; grid of shape values. |
PFam |
an object of class |
low |
numeric; argument for |
upp |
numeric; argument for |
accuracy |
numeric; argument for |
GridFileName |
character; if |
withPrint |
logical of length 1: shall current shape value be printed out? |
getShapeGrid
is a helper function to produce an unequally spaced
grid of shape values xi, with the rationale that we need values close
to some typical values more often than values at the border. The code
starts with an equally spaced grid of size gridsize
from 0.5
to 1-0.25/gridsize
. This is reflected at 0.5
,
and a grid of respective quantiles of Norm(mean=centralvalue, sd=fac)
is produced—with the heuristic rational that most estimators will be
asymptotically normal around a typical value. If withPos
is TRUE,
negative values are cut off and replaced by respective higher quantiles of the
corresponding normal; similarly, values to close to 0 are replaced by values
between the cutoff value and the next admissible value and again by
respective higher normal quantiles.
getSnGrid
is a helper function to produce a grid of Sn
values
for a given grid of shape values and scale equal to 1 in a given
shape-scale family.
This result of this function can then be used to speed
up calls to Sn
(or to medSn
) by providing particular methods
for Sn
.
For an example of such a particular method see the body of
getMethod("Sn", "GPareto")
where object
sng[["Generalized Pareto Family"]]
is just the result of a call
getSnGrid(xiGrid = getShapeGrid(), PFam=GParetoFamily())
which
has been stored in the namespace of package distrMod
.
getShapeGrid |
a numeric grid of xi-values. |
getSnGrid |
a grid, i.e.; a matrix with columns
|
Peter Ruckdeschel [email protected]
## (empirical) Data getShapeGrid(50) head(getShapeGrid(withPos=FALSE)) ## Not run: ### code used for the grid stored in the namespace of distrMod: getSnGrid() ## End(Not run)
## (empirical) Data getShapeGrid(50) head(getShapeGrid(withPos=FALSE)) ## Not run: ### code used for the grid stored in the namespace of distrMod: getSnGrid() ## End(Not run)
We provide wrapper to the diagnostic plots
gpd.diag
and gev.diag
of package ismev,
as well as to profilers gpd.prof
, gpd.profxi
and gev.prof
,
gev.profxi
.
gpd.diag(z,...) ## S4 method for signature 'gpd.fit' gpd.diag(z) ## S4 method for signature 'GPDEstimate' gpd.diag(z, npy = 365) gev.diag(z) ## S4 method for signature 'gev.fit' gev.diag(z) ## S4 method for signature 'GEVEstimate' gev.diag(z) gpd.prof(z,...) ## S4 method for signature 'gpd.fit' gpd.prof(z, m, xlow, xup, npy = 365, conf = 0.95, nint = 100) ## S4 method for signature 'GPDEstimate' gpd.prof(z, m, xlow, xup, npy = 365, conf = 0.95, nint = 100) gev.prof(z,...) ## S4 method for signature 'gev.fit' gev.prof(z, m, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GEVEstimate' gev.prof(z, m, xlow, xup, conf = 0.95, nint = 100) gpd.profxi(z,...) ## S4 method for signature 'gpd.fit' gpd.profxi(z, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GPDEstimate' gpd.profxi(z, xlow, xup, npy = 365, conf = 0.95, nint = 100) gev.profxi(z,...) ## S4 method for signature 'gev.fit' gev.profxi(z, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GEVEstimate' gev.profxi(z, xlow, xup, conf = 0.95, nint = 100)
gpd.diag(z,...) ## S4 method for signature 'gpd.fit' gpd.diag(z) ## S4 method for signature 'GPDEstimate' gpd.diag(z, npy = 365) gev.diag(z) ## S4 method for signature 'gev.fit' gev.diag(z) ## S4 method for signature 'GEVEstimate' gev.diag(z) gpd.prof(z,...) ## S4 method for signature 'gpd.fit' gpd.prof(z, m, xlow, xup, npy = 365, conf = 0.95, nint = 100) ## S4 method for signature 'GPDEstimate' gpd.prof(z, m, xlow, xup, npy = 365, conf = 0.95, nint = 100) gev.prof(z,...) ## S4 method for signature 'gev.fit' gev.prof(z, m, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GEVEstimate' gev.prof(z, m, xlow, xup, conf = 0.95, nint = 100) gpd.profxi(z,...) ## S4 method for signature 'gpd.fit' gpd.profxi(z, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GPDEstimate' gpd.profxi(z, xlow, xup, npy = 365, conf = 0.95, nint = 100) gev.profxi(z,...) ## S4 method for signature 'gev.fit' gev.profxi(z, xlow, xup, conf = 0.95, nint = 100) ## S4 method for signature 'GEVEstimate' gev.profxi(z, xlow, xup, conf = 0.95, nint = 100)
z |
an argument of class |
m |
The return level (i.e.\ the profile likelihood is for the
value that is exceeded with probability |
... |
further parameters to be passed on the specific methods. |
xlow , xup
|
The least and greatest value at which to evaluate the profile likelihood. |
npy |
The number of observations per year. |
conf |
The confidence coefficient of the plotted profile confidence interval. |
nint |
The number of points at which the profile likelihood is evaluated. |
We provide a coercing of our fits of S4-classes "GPDEstimate"
and "GEVEstimate"
to the (S3-)classes gpd.fit
and gev.fit
of package ismev (the latter being cast to an S4 class, internally, in
our package.
For gpd.fit
, gev.fit
(quoted from package ismev:
For stationary models four plots are produced; a probability plot,
a quantile plot, a return level plot and a histogram of data with
fitted density.
For non-stationary models two plots are produced; a residual probability plot and a residual quantile plot.
For gpd.prof
, gev.prof
(quoted from package ismev:
A plot of the profile likelihood is produced, with a horizontal
line representing a profile confidence interval with confidence
coefficient conf
.
Peter Ruckdeschel [email protected]
ismev: An Introduction to Statistical Modeling of Extreme Values. R package version 1.39. https://CRAN.R-project.org/package=ismev; original S functions written by Janet E. Heffernan with R port and R documentation provided by Alec G. Stephenson. (2012).
Coles, S. (2001). An introduction to statistical modeling of extreme values. London: Springer.
if(require(ismev)){ ## from ismev data(portpirie) data(rain) detach(package:ismev) ppfit <- ismev::gev.fit(portpirie[,2]) gev.diag(ppfit) ## (mlE <- MLEstimator(portpirie[,2], GEVFamilyMuUnknown(withPos=FALSE))) gev.diag(mlE) ## not tested on CRAN because it takes some time... gev.prof(mlE, m = 10, 4.1, 5) gev.profxi(mlE, -0.3, 0.3) rnfit <- ismev::gpd.fit(rain,10) gpd.diag(rnfit) ## mlE2 <- MLEstimator(rain[rain>10], GParetoFamily(loc=10)) gpd.diag(mlE2) gpd.prof(mlE2, m = 10, 55, 77) gpd.profxi(mlE2, -0.02, 0.02) }
if(require(ismev)){ ## from ismev data(portpirie) data(rain) detach(package:ismev) ppfit <- ismev::gev.fit(portpirie[,2]) gev.diag(ppfit) ## (mlE <- MLEstimator(portpirie[,2], GEVFamilyMuUnknown(withPos=FALSE))) gev.diag(mlE) ## not tested on CRAN because it takes some time... gev.prof(mlE, m = 10, 4.1, 5) gev.profxi(mlE, -0.3, 0.3) rnfit <- ismev::gpd.fit(rain,10) gpd.diag(rnfit) ## mlE2 <- MLEstimator(rain[rain>10], GParetoFamily(loc=10)) gpd.diag(mlE2) gpd.prof(mlE2, m = 10, 55, 77) gpd.profxi(mlE2, -0.02, 0.02) }
Function for the computation of asymmetric median absolute deviation (kMAD)
It coincides with ordinary median absolute deviation (MAD) for .
kMAD(x,k,...) ## S4 method for signature 'numeric,numeric' kMAD(x, k = 1, na.rm = TRUE, eps = .Machine$double.eps, ... ) ## S4 method for signature 'UnivariateDistribution,numeric' kMAD(x, k = 1, up = NULL, ... )
kMAD(x,k,...) ## S4 method for signature 'numeric,numeric' kMAD(x, k = 1, na.rm = TRUE, eps = .Machine$double.eps, ... ) ## S4 method for signature 'UnivariateDistribution,numeric' kMAD(x, k = 1, up = NULL, ... )
x |
a numeric vector or a distribution. |
k |
numeric; tunning parameter for asymmetrical MAD; has to be of length 1 and larger than 1. |
na.rm |
logical; if |
eps |
numeric; accuracy up to which to state equality of two numeric values |
up |
numeric; upper bound for search interval; important in distributions without left/right endpoint. |
... |
additional arguments for other functions; not used so far; |
For kMAD (asymmetrial MAD) is a root of the equation:
,
where F
is the cumulative distribution function, m
is the median of F
.
Peter Ruckdeschel [email protected], Nataliya Horbenko [email protected]
Ruckdeschel, P., Horbenko, N. (2010): Robustness Properties for Generalized Pareto Distributions. ITWM Report 182.
x <- rnorm(100) kMAD(x,k=10) kMAD(Norm(),k=10)
x <- rnorm(100) kMAD(x,k=10) kMAD(Norm(),k=10)
Class of Location Dispersion estimates.
Objects can be created by calls of the form new("LDEstimate", ...)
.
More frequently they are created via the generating function
LDEstimator
.
name
Object of class "character"
:
name of the estimator.
estimate
Object of class "ANY"
:
estimate.
estimate.call
Object of class "call"
:
call by which estimate was produced.
dispersion
Object of class "numeric"
:
the value of the fitted dispersion.
location
Object of class "numeric"
:
the value of the fitted location.
Infos
object of class "matrix"
with two columns named method
and message
:
additional informations.
asvar
object of class "OptionalMatrix"
which may contain the asymptotic (co)variance of the estimator.
samplesize
object of class "numeric"
—
the samplesize at which the estimate was evaluated.
nuis.idx
object of class "OptionalNumeric"
:
indices of estimate
belonging to the nuisance part
fixed
object of class "OptionalNumeric"
:
the fixed and known part of the parameter.
trafo
object of class "list"
:
a list with components fct
and mat
(see below).
untransformed.estimate
Object of class "ANY"
:
untransformed estimate.
untransformed.asvar
object of class "OptionalNumericOrMatrix"
which may contain the asymptotic (co)variance of the untransformed
estimator.
completecases
object of class "logical"
—
complete cases at which the estimate was evaluated.
Class "Estimate"
, directly.
signature(object = "LDEstimate")
:
accessor function for slot dispersion
.
signature(object = "LDEstimate")
:
accessor function for slot location
.
signature(object = "LDEstimate")
Matthias Kohl [email protected],
Peter Ruckdeschel [email protected]
Estimate-class
, LDEstimator
,
MCEstimator
## (empirical) Data x <- rgamma(50, scale = 0.5, shape = 3) ## parametric family of probability measures G <- GammaFamily(scale = 1, shape = 2) (S <- medQn(x, G)) dispersion(S) location(S)
## (empirical) Data x <- rgamma(50, scale = 0.5, shape = 3) ## parametric family of probability measures G <- GammaFamily(scale = 1, shape = 2) (S <- medQn(x, G)) dispersion(S) location(S)
Function LDEstimator
provides a general way to compute
estimates for a given parametric family of probability measures
(with a scale and shape parameter) which
can be obtained by matching location and dispersion functionals
against empirical counterparts.
LDEstimator(x, loc.est, disp.est, loc.fctal, disp.fctal, ParamFamily, loc.est.ctrl = NULL, loc.fctal.ctrl=NULL, disp.est.ctrl = NULL, disp.fctal.ctrl=NULL, q.lo =1e-3, q.up=15, log.q =TRUE, name, Infos, asvar = NULL, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE, vdbg = FALSE) medkMAD(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE, vdbg = FALSE) medkMADhybr(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, KK = 20, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE) medSn(x, ParamFamily, q.lo =1e-3, q.up=10, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, accuracy = 100, ..., .withEvalAsVar = FALSE) medQn(x, ParamFamily, q.lo =1e-3, q.up=15, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE)
LDEstimator(x, loc.est, disp.est, loc.fctal, disp.fctal, ParamFamily, loc.est.ctrl = NULL, loc.fctal.ctrl=NULL, disp.est.ctrl = NULL, disp.fctal.ctrl=NULL, q.lo =1e-3, q.up=15, log.q =TRUE, name, Infos, asvar = NULL, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE, vdbg = FALSE) medkMAD(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE, vdbg = FALSE) medkMADhybr(x, ParamFamily, k=1, q.lo =1e-3, q.up=15, KK = 20, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE) medSn(x, ParamFamily, q.lo =1e-3, q.up=10, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, accuracy = 100, ..., .withEvalAsVar = FALSE) medQn(x, ParamFamily, q.lo =1e-3, q.up=15, nuis.idx = NULL, trafo = NULL, fixed = NULL, asvar.fct = NULL, na.rm = TRUE, ..., .withEvalAsVar = FALSE)
x |
(empirical) data |
ParamFamily |
an object of class |
loc.est |
a function expecting |
disp.est |
a function expecting |
loc.fctal |
a function expecting a distribution object as first argument; location functional. |
disp.fctal |
a function expecting a distribution object as first argument; dispersion functional; may only take non-negative values. |
loc.est.ctrl |
a list (or |
disp.est.ctrl |
a list (or |
loc.fctal.ctrl |
a list (or |
disp.fctal.ctrl |
a list (or |
k |
numeric; additional parameter for |
KK |
numeric; Maximal number of trials with different |
q.lo |
numeric; lower bound for search intervall in shape parameter. |
q.up |
numeric; upper bound for search intervall in shape parameter. |
log.q |
logical; shall the zero search be done on log-scale? |
name |
optional name for estimator. |
Infos |
character: optional informations about estimator |
asvar |
optionally the asymptotic (co)variance of the estimator |
nuis.idx |
optionally the indices of the estimate belonging to nuisance parameter |
fixed |
optionally (numeric) the fixed part of the parameter |
trafo |
an object of class |
asvar.fct |
optionally: a function to determine the corresponding
asymptotic variance; if given, |
na.rm |
logical: if |
accuracy |
numeric: argument to be passed on to |
... |
further arguments to be passed to location estimator and functional and dispersion estimator and functional. |
vdbg |
logical; if |
.withEvalAsVar |
logical: shall slot |
The arguments loc.est
, disp.est
(location and dispersion estimators)
have to be functions with first argument x
(a numeric vector with the
empirical data) and additional, optional individual arguments to be passed on
in the respective calls as lists loc.est.ctrl
, disp.est.ctrl
,
and global additional arguments through the ...
argument.
Similarly, arguments loc.fctal
, disp.fctal
(location and
dispersion functionals) have to be functions with first argument an
object of class UnivariateDistribution
, and additional, optional
individual arguments to be passed on
in the respective calls as lists loc.fctal.ctrl
, disp.fctal.ctrl
,
and global additional arguments again through the ...
argument.
Uses .LDMatch
internally.
An object of S4-class "Estimate"
.
The values for q.lo
and q.up
are a bit delicate and
have to be found, model by model, by try and error.
As a rule, medSn
is rather slow, as the evaluation of the Sn
functional is quite expensive. So if medSn
is the estimator of choice,
it pays off, for a given shape-scale family, to evaluate medSn
on a
grid of shape-values (with scale 1) and then to use an interpolation techniques
in a particular method to replace the default one for this shape-scale family.
As an example, we have done so for the GPD family.
Nataliya Horbenko [email protected],
Peter Ruckdeschel [email protected]
Marazzi, A. and Ruffieux, C. (1999): The truncated mean of asymmetric distribution. Computational Statistics and Data Analysis 32, 79-100.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4), 762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025-1047. doi:10.1007/s00184-011-0366-4.
ParamFamily-class
, ParamFamily
,
Estimate-class
## (empirical) Data set.seed(123) x <- rgamma(50, scale = 0.5, shape = 3) ## parametric family of probability measures G <- GammaFamily(scale = 1, shape = 2) medQn(x = x, ParamFamily = G) medSn(x = x, ParamFamily = G, q.lo = 0.5, q.up = 4) ## not tested on CRAN because it takes time... ## without speedup for Sn: LDEstimator(x, loc.est = median, disp.est = Sn, loc.fctal = median, disp.fctal = getMethod("Sn","UnivariateDistribution"), ParamFamily = G, disp.est.ctrl = list(constant=1)) medkMAD(x = x, ParamFamily = G) medkMADhybr(x = x, ParamFamily = G) medkMAD(x = x, k=10, ParamFamily = G) ##not at all robust: LDEstimator(x, loc.est = mean, disp.est = sd, loc.fctal = E, disp.fctal = sd, ParamFamily = G)
## (empirical) Data set.seed(123) x <- rgamma(50, scale = 0.5, shape = 3) ## parametric family of probability measures G <- GammaFamily(scale = 1, shape = 2) medQn(x = x, ParamFamily = G) medSn(x = x, ParamFamily = G, q.lo = 0.5, q.up = 4) ## not tested on CRAN because it takes time... ## without speedup for Sn: LDEstimator(x, loc.est = median, disp.est = Sn, loc.fctal = median, disp.fctal = getMethod("Sn","UnivariateDistribution"), ParamFamily = G, disp.est.ctrl = list(constant=1)) medkMAD(x = x, ParamFamily = G) medkMADhybr(x = x, ParamFamily = G) medkMAD(x = x, k=10, ParamFamily = G) ##not at all robust: LDEstimator(x, loc.est = mean, disp.est = sd, loc.fctal = E, disp.fctal = sd, ParamFamily = G)
In optIC
a gain in accuracy can be obtained when computing
the optimally-robust ICs at a reference parameter of the model (instead of an
arbtirary one). To this end, moveL2Fam2RefParam
moved the model to
the reference parameter and moveICBackFromRefParam
moves the obtained
optimal IC back to the original parameter.
moveL2Fam2RefParam(L2Fam, ...) moveICBackFromRefParam(IC, L2Fam,...)
moveL2Fam2RefParam(L2Fam, ...) moveICBackFromRefParam(IC, L2Fam,...)
L2Fam |
object of class |
IC |
IC of class |
... |
further arguments to be passed to particular methods |
moveL2Fam2RefParam
and moveICBackFromRefParam
are used
internally in functions robest
and roptest
to compute the
optimally robust influence function according to the arguments given to them.
moveL2Fam2RefParam |
the L2 Family transformed to reference parameter. |
moveICBackFromRefParam |
the backtransformed IC. |
signature(L2Fam = "L2ScaleShapeUnion")
:
moves L2Fam
to scale 1
(and, if existing location to
0
).
signature(IC = "IC", L2Fam = "L2ScaleShapeUnion")
:
moves IC in IC
back to original location and scale in L2Fam
(and in addition changes Lagrange multipliers accordingly),
rescaling risk where necessary.
signature(IC = "IC", L2Fam = "L2LocScaleShapeUnion")
:
moves IC in IC
back to original location and scale in L2Fam
(and in addition changes Lagrange multipliers accordingly),
rescaling risk where necessary.
Peter Ruckdeschel [email protected]
Generates an object of class "Pareto"
.
Pareto(shape = 1, Min = 1)
Pareto(shape = 1, Min = 1)
shape |
positive real number: shape parameter of the Pareto distribution. |
Min |
positive real number: Min parameter of the Pareto distribution |
Object of class "Pareto"
The class "Pareto"
is based on the code provided
by the package actuar by Vincent Goulet and Mathieu Pigeon.
Nataliya Horbenko [email protected]
(P1 <- Pareto(shape = 1, Min = 1)) plot(P1) E(Pareto()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
(P1 <- Pareto(shape = 1, Min = 1)) plot(P1) E(Pareto()) E(P1) E(P1, function(x){x^2}) var(P1) sd(P1) median(P1) IQR(P1) mad(P1)
[borrowed from actuar]:
The (Single-parameter) Pareto distribution with parameter shape
has density:
for ,
and
.
Although there appears to be two parameters, only shape
is a true
parameter. The value of min
must be set in
advance.
Objects can be created by calls of the form new("Pareto", shape, Min)
.
More frequently they are created via the generating function
Pareto
.
img
Object of class "Reals"
.
param
Object of class "ParetoParameter"
.
r
rpareto1
d
dpareto1
p
ppareto1
q
qpareto1
gaps
(numeric) matrix or NULL
.withArith
logical: used internally to issue warnings as to interpretation of arithmetics
.withSim
logical: used internally to issue warnings as to accuracy
.logExact
logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function
.lowerExact
logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function
Class "AbscontDistribution"
, directly.
Class "UnivariateDistribution"
, by class "AbscontDistribution"
.
Class "Distribution"
, by class "AbscontDistribution"
.
signature(.Object = "Pareto")
: initialize method.
signature(object = "Pareto")
: wrapped access method for
slot shape
of slot param
.
signature(x = "Pareto")
: wrapped access method for
slot Min
of slot param
.
signature(x = "Pareto")
: wrapped access method for
slot Min
of slot param
.
signature(object = "Pareto")
: wrapped replace method for
slot shape
of slot param
.
signature(x = "Pareto")
: wrapped replace method for
slot Min
of slot param
.
signature(object = "Pareto", fun = "missing", cond = "missing")
:
exact evaluation using explicit expressions.
signature(signature(x = "Pareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "Pareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "Pareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "Pareto")
:
exact evaluation using explicit expressions.
signature(signature(x = "Pareto")
:
exact evaluation using explicit expressions.
signature(e1 = "Pareto", e2 = "numeric")
: exact method
for this transformation — stays within this class if e2>0
.
signature(object = "Pareto", x = "numeric")
:
checks if x
lies in the support of the respective distribution.
This class is based on the code provided by the package actuar by Vincent Goulet and Mathieu Pigeon.
Nataliya Horbenko [email protected]
Johnson et al. (1995) Continuous Univariate Distributions. Vol. 2. 2nd ed.
New York: Wiley.
Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2004),
Loss Models, From Data to Decisions, Second Edition, Wiley.
dpareto1
, AbscontDistribution-class
(P1 <- new("Pareto", shape = 1, Min = 2)) plot(P1) shape(P1) Min(P1) shape(P1) <- 4 Min(P1) <- 2 plot(P1)
(P1 <- new("Pareto", shape = 1, Min = 2)) plot(P1) shape(P1) Min(P1) shape(P1) <- 4 Min(P1) <- 2 plot(P1)
Generates an object of class "ParetoFamily"
which
represents a Pareto family.
ParetoFamily(Min = 1, shape = 0.5, trafo = NULL, start0Est = NULL, withCentL2 = FALSE)
ParetoFamily(Min = 1, shape = 0.5, trafo = NULL, start0Est = NULL, withCentL2 = FALSE)
Min |
real: known/fixed threshold/location parameter |
shape |
positive real: shape parameter |
trafo |
matrix or NULL: transformation of the parameter |
start0Est |
startEstimator — if |
withCentL2 |
logical: shall L2 derivative be centered by substracting
the E()? Defaults to |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "ParetoFamily"
Matthias Kohl [email protected]
Peter Ruckdeschel [email protected]
Nataliya Horbenko [email protected]
Kohl, M. (2005) Numerical Contributions to
the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
Kohl, M., Ruckdeschel, P., and Rieder, H. (2010):
Infinitesimally Robust Estimation in General Smoothly Parametrized Models.
Stat. Methods Appl., 19, 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4),
762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
(P1 <- ParetoFamily()) FisherInfo(P1) checkL2deriv(P1)
(P1 <- ParetoFamily()) FisherInfo(P1) checkL2deriv(P1)
The class of the parameter of Pareto distributions.
Objects can be created by calls of the form new("ParetoParameter", ...)
.
shape
real number: shape parameter of a Pareto distribution.
Min
positive real number: Min parameter of a Pareto distribution.
name
default name is “parameter of a Pareto distribution”.
Class "Parameter"
, directly.
Class "OptionalParameter"
, by class "Parameter"
.
signature(object = "ParetoParameter")
: access method for
slot shape
.
signature(x = "ParetoParameter")
: access method for
slot Min
.
signature(x = "ParetoParameter")
: access method for
slot Min
.
signature(object = "ParetoParameter")
: replace method for
slot shape
.
signature(x = "ParetoParameter")
: replace method for
slot Min
.
Nataliya Horbenko [email protected]
(P1 <- new("ParetoParameter")) Min(P1) shape(P1) Min(P1) <- 3 shape(P1) <- 4 P1
(P1 <- new("ParetoParameter")) Min(P1) shape(P1) Min(P1) <- 3 shape(P1) <- 4 P1
Function PickandsEstimator
computes Pickands estimator
(for the GPD and GEVD) at real data and returns an object of class Estimate
.
PickandsEstimator(x, ParamFamily=GParetoFamily(), alpha=2, name, Infos, nuis.idx = NULL, trafo = NULL, fixed = NULL, na.rm = TRUE, ...) .PickandsEstimator(x, alpha=2, GPD.l = TRUE)
PickandsEstimator(x, ParamFamily=GParetoFamily(), alpha=2, name, Infos, nuis.idx = NULL, trafo = NULL, fixed = NULL, na.rm = TRUE, ...) .PickandsEstimator(x, alpha=2, GPD.l = TRUE)
x |
(empirical) data |
alpha |
numeric |
ParamFamily |
an object of class |
name |
optional name for estimator. |
Infos |
character: optional informations about estimator |
nuis.idx |
optionally the indices of the estimate belonging to nuisance parameter |
fixed |
optionally (numeric) the fixed part of the parameter |
trafo |
an object of class |
na.rm |
logical: if |
... |
not yet used. |
GPD.l |
logical: if |
The actual work is done in .PickandsEstimator
.
The wrapper PickandsEstimator
pre-treats the data,
and constructs a respective Estimate
object.
.PickandsEstimator |
A numeric vector of length |
PickandsEstimator |
An object of S4-class |
The scale estimate we use, i.e., with scale =
and shape =
, we estimate scale by
, differs from
the one given in the original reference, where it was
.
The one chosen here avoids taking differences
hence does not require
; this leads to
(functional) breakdown point (bdp)
which is independent , whereas the original setting leads to
a bdp which is depending on
. As a consequence our setting, the bdp-optimal choice of
for GDP is
leading to bdp
, and
for GEVD leading to bdp
. For comparison, with the
original setting, at
, this gives optimal bdp's
and
for GPD and GEVD, respectively.
The standard choice of
such that
gives the median (
in the GPD and
in the GEVD) in our setting gives
bdp's of
and
for GPD and GEVD, respectively, and
in the original setting, at
, gives bdp's
and
.
Nataliya Horbenko [email protected],
Peter Ruckdeschel [email protected]
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
Pickands, J. (1975): Statistical inference using extreme order statistics.
Ann. Stat. 3(1), 119–131.
ParamFamily-class
, ParamFamily
,
Estimate-class
## (empirical) Data set.seed(123) x <- rgpd(50, scale = 0.5, shape = 3) y <- rgev(50, scale = 0.5, shape = 3) ## parametric family of probability measures P <- GParetoFamily(scale = 1, shape = 2) G <- GEVFamily(scale = 1, shape = 2) ## PickandsEstimator(x = x, ParamFamily = P) PickandsEstimator(x = y, ParamFamily = G)
## (empirical) Data set.seed(123) x <- rgpd(50, scale = 0.5, shape = 3) y <- rgev(50, scale = 0.5, shape = 3) ## parametric family of probability measures P <- GParetoFamily(scale = 1, shape = 2) G <- GEVFamily(scale = 1, shape = 2) ## PickandsEstimator(x = x, ParamFamily = P) PickandsEstimator(x = y, ParamFamily = G)
Function QuantileBCCEstimator
computes QuantileBCC estimator
(for the Weibull) at real data and returns an object of class Estimate
.
QuantileBCCEstimator(x, p1 = 1/3, p2 = 2/3, name, Infos, nuis.idx = NULL, trafo = NULL, fixed = NULL, na.rm = TRUE, ...) .QBCC(x, p1 = 1/3, p2 = 2/3)
QuantileBCCEstimator(x, p1 = 1/3, p2 = 2/3, name, Infos, nuis.idx = NULL, trafo = NULL, fixed = NULL, na.rm = TRUE, ...) .QBCC(x, p1 = 1/3, p2 = 2/3)
x |
(empirical) data |
p1 , p2
|
levels of the quantiles; maximal breakdown point is achieved
for |
name |
optional name for estimator. |
Infos |
character: optional informations about estimator |
nuis.idx |
optionally the indices of the estimate belonging to nuisance parameter |
fixed |
optionally (numeric) the fixed part of the parameter |
trafo |
an object of class |
na.rm |
logical: if |
... |
not yet used. |
The actual work is done in .QBCC
.
The wrapper QuantileBCCEstimator
pre-treats the data,
and constructs a respective Estimate
object.
.QuantileBCCEstimator |
A numeric vector of length |
QuantileBCCEstimator |
An object of S4-class |
Nataliya Horbenko [email protected],
Peter Ruckdeschel [email protected]
Boudt, K., Caliskan, D., Croux, C. (2011): Robust explicit estimators of Weibull parameters. Metrika, 73 (2), 187–209.
ParamFamily-class
, ParamFamily
,
Estimate-class
## (empirical) Data set.seed(123) distroptions("withgaps"=FALSE) x <- rweibull(50, scale = 0.5, shape = 3) ## QuantileBCCEstimator(x = x)
## (empirical) Data set.seed(123) distroptions("withgaps"=FALSE) x <- rweibull(50, scale = 0.5, shape = 3) ## QuantileBCCEstimator(x = x)
Constants built into RobExtremes.
EULERMASCHERONICONSTANT APERYCONSTANT
EULERMASCHERONICONSTANT APERYCONSTANT
RobExtremes has a small number of built-in constants.
The following constants are available:
EULERMASCHERONICONSTANT
: the Euler Mascheroni constant
given in http://mathworld.wolfram.com/Euler-MascheroniConstant.html (48);
APERYCONSTANT
: the Apéry constant
as given in http://mathworld.wolfram.com/AperysConstant.html, equation (8);
These are implemented as variables in the RobExtremes name space taking appropriate values.
EULERMASCHERONICONSTANT APERYCONSTANT
EULERMASCHERONICONSTANT APERYCONSTANT
Methods for function validParameter
in package RobExtremes
to check whether a new parameter (e.g. "proposed" by an optimization)
is valid.
validParameter(object, ...) ## S4 method for signature 'GParetoFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'WeibullFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'GEVFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'ParetoFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'GEVFamilyMuUnknown' validParameter(object, param, tol=.Machine$double.eps)
validParameter(object, ...) ## S4 method for signature 'GParetoFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'WeibullFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'GEVFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'ParetoFamily' validParameter(object, param, tol=.Machine$double.eps) ## S4 method for signature 'GEVFamilyMuUnknown' validParameter(object, param, tol=.Machine$double.eps)
object |
an object of class |
param |
either a numeric vector or an object of class
|
tol |
accuracy upto which the conditions have to be fulfilled |
... |
additional argument(s) for methods. |
method for signature
GParetoFamily
checks if both parameters are finite by is.finite
,
if their length is 1 or 2 (e.g. if one features as nuisance parameter), and if
both are strictly larger than 0 (upto argument tol
)
WeibullFamily
checks if both parameters are finite by is.finite
,
if their length is 1 or 2 (e.g. if one features as nuisance parameter), and if
both are strictly larger than 0 (upto argument tol
)
GEVFamily
checks if both parameters are finite by is.finite
,
if their length is 1 or 2 (e.g. if one features as nuisance parameter), and if
both are strictly larger than 0 (upto argument tol
)
GParetoFamily
checks if both parameters are finite by is.finite
,
if their length is 1 or 2 (e.g. if one features as nuisance parameter), and if
both are strictly larger than 0 (upto argument tol
)
GEVFamilyMuUnknown
checks if all parameters are finite by is.finite
,
if their length is in 1,2,3 (e.g. if one features as nuisance parameter), and scale
and shape both are strictly larger than 0 (upto argument tol
)
logical
of length 1 — valid or not
G <- GParetoFamily() validParameter(G, c(scale=0.1, shape=2)) validParameter(G, c(scale=-0.1, shape=-2))
G <- GParetoFamily() validParameter(G, c(scale=0.1, shape=2)) validParameter(G, c(scale=-0.1, shape=-2))
Generic functions for the computation of functionals on distributions.
IQR(x, ...) ## S4 method for signature 'Gumbel' IQR(x) ## S4 method for signature 'GEV' IQR(x) ## S4 method for signature 'GPareto' IQR(x) ## S4 method for signature 'Pareto' IQR(x) median(x, ...) ## S4 method for signature 'Gumbel' median(x) ## S4 method for signature 'GEV' median(x) ## S4 method for signature 'GPareto' median(x) ## S4 method for signature 'Pareto' median(x) var(x, ...) ## S4 method for signature 'Gumbel' var(x, ...) ## S4 method for signature 'GEV' var(x, ...) ## S4 method for signature 'GPareto' var(x, ...) ## S4 method for signature 'Pareto' var(x, ...) skewness(x, ...) ## S4 method for signature 'Gumbel' skewness(x, ...) ## S4 method for signature 'GEV' skewness(x, ...) ## S4 method for signature 'GPareto' skewness(x, ...) ## S4 method for signature 'Pareto' skewness(x, ...) kurtosis(x, ...) ## S4 method for signature 'Gumbel' kurtosis(x, ...) ## S4 method for signature 'GEV' kurtosis(x, ...) ## S4 method for signature 'GPareto' kurtosis(x, ...) ## S4 method for signature 'Pareto' kurtosis(x, ...) Sn(x, ...) ## S4 method for signature 'ANY' Sn(x, ...) ## S4 method for signature 'UnivariateDistribution' Sn(x, low = 0, upp = 1.01, accuracy = 1000, ...) ## S4 method for signature 'DiscreteDistribution' Sn(x, ...) ## S4 method for signature 'AffLinDistribution' Sn(x, ...) ## S4 method for signature 'Norm' Sn(x, ...) ## S4 method for signature 'GPareto' Sn(x, ...) ## S4 method for signature 'Pareto' Sn(x, ...) ## S4 method for signature 'GEV' Sn(x, ...) ## S4 method for signature 'Gammad' Sn(x, ...) ## S4 method for signature 'Weibull' Sn(x, ...) Qn(x, ...) ## S4 method for signature 'ANY' Qn(x, ...) ## S4 method for signature 'UnivariateDistribution' Qn(x, q00 = NULL, ...) ## S4 method for signature 'AffLinDistribution' Qn(x, ...) ## S4 method for signature 'DiscreteDistribution' Qn(x, ...) ## S4 method for signature 'Norm' Qn(x, ...)
IQR(x, ...) ## S4 method for signature 'Gumbel' IQR(x) ## S4 method for signature 'GEV' IQR(x) ## S4 method for signature 'GPareto' IQR(x) ## S4 method for signature 'Pareto' IQR(x) median(x, ...) ## S4 method for signature 'Gumbel' median(x) ## S4 method for signature 'GEV' median(x) ## S4 method for signature 'GPareto' median(x) ## S4 method for signature 'Pareto' median(x) var(x, ...) ## S4 method for signature 'Gumbel' var(x, ...) ## S4 method for signature 'GEV' var(x, ...) ## S4 method for signature 'GPareto' var(x, ...) ## S4 method for signature 'Pareto' var(x, ...) skewness(x, ...) ## S4 method for signature 'Gumbel' skewness(x, ...) ## S4 method for signature 'GEV' skewness(x, ...) ## S4 method for signature 'GPareto' skewness(x, ...) ## S4 method for signature 'Pareto' skewness(x, ...) kurtosis(x, ...) ## S4 method for signature 'Gumbel' kurtosis(x, ...) ## S4 method for signature 'GEV' kurtosis(x, ...) ## S4 method for signature 'GPareto' kurtosis(x, ...) ## S4 method for signature 'Pareto' kurtosis(x, ...) Sn(x, ...) ## S4 method for signature 'ANY' Sn(x, ...) ## S4 method for signature 'UnivariateDistribution' Sn(x, low = 0, upp = 1.01, accuracy = 1000, ...) ## S4 method for signature 'DiscreteDistribution' Sn(x, ...) ## S4 method for signature 'AffLinDistribution' Sn(x, ...) ## S4 method for signature 'Norm' Sn(x, ...) ## S4 method for signature 'GPareto' Sn(x, ...) ## S4 method for signature 'Pareto' Sn(x, ...) ## S4 method for signature 'GEV' Sn(x, ...) ## S4 method for signature 'Gammad' Sn(x, ...) ## S4 method for signature 'Weibull' Sn(x, ...) Qn(x, ...) ## S4 method for signature 'ANY' Qn(x, ...) ## S4 method for signature 'UnivariateDistribution' Qn(x, q00 = NULL, ...) ## S4 method for signature 'AffLinDistribution' Qn(x, ...) ## S4 method for signature 'DiscreteDistribution' Qn(x, ...) ## S4 method for signature 'Norm' Qn(x, ...)
x |
object of class |
... |
additional arguments to |
q00 |
numeric or NULL: determines search interval (from |
low |
numeric; lower bound for search interval for median(abs(x-Y)) where
Y (a real constant) runs over the range of x; defaults to |
upp |
numeric; upper bound for search interval for median(abs(x-Y)) where
Y (a real constant) runs over the range of x; defaults to |
accuracy |
numeric; number of grid points for |
The value of the corresponding functional at the distribution in the argument is computed.
Qn
, signature(x = "Any")
:interface to the robustbase-function Qn
— see Qn
.
Qn
, signature(x = "UnivariateDistribution")
:Qn of univariate distributions.
Qn
, signature(x = "DiscreteDistribution")
:Qn of discrete distributions.
Qn
, signature(x = "AffLinDistribution")
:abs(x@a) * Qn(x@X0)
Sn
, signature(x = "Any")
:interface to the robustbase-function Qn
— see Sn
.
Sn
, signature(x = "UnivariateDistribution")
:Sn of univariate distributions using pseudo-random variables (Thx to N. Horbenko).
Sn
, signature(x = "DiscreteDistribution")
:Sn of discrete distributions.
Sn
, signature(x = "AffLinDistribution")
:abs(x@a) * Sn(x@X0)
var
, signature(x = "Gumbel")
:exact evaluation using explicit expressions.
var
, signature(x = "GPareto")
:exact evaluation using explicit expressions.
var
, signature(x = "GEV")
:exact evaluation using explicit expressions.
var
, signature(x = "Pareto")
:exact evaluation using explicit expressions.
IQR
, signature(x = "Gumbel")
:exact evaluation using explicit expressions.
IQR
, signature(x = "GPareto")
:exact evaluation using explicit expressions.
IQR
, signature(x = "GEV")
:exact evaluation using explicit expressions.
IQR
, signature(x = "Pareto")
:exact evaluation using explicit expressions.
median
, signature(x = "Gumbel")
:exact evaluation using explicit expressions.
median
, signature(x = "GEV")
:exact evaluation using explicit expressions.
median
, signature(x = "GPareto")
:exact evaluation using explicit expressions.
median
, signature(x = "Pareto")
:exact evaluation using explicit expressions.
skewness
, signature(x = "Gumbel")
:exact evaluation using explicit expressions.
skewness
, signature(x = "GEV")
:exact evaluation using explicit expressions.
skewness
, signature(x = "GPareto")
:exact evaluation using explicit expressions.
skewness
, signature(x = "Pareto")
:exact evaluation using explicit expressions.
kurtosis
, signature(x = "Gumbel")
:exact evaluation using explicit expressions.
kurtosis
, signature(x = "GEV")
:exact evaluation using explicit expressions.
kurtosis
, signature(x = "GPareto")
:exact evaluation using explicit expressions.
kurtosis
, signature(x = "Pareto")
:exact evaluation using explicit expressions.
Sn
, signature(x = "Norm")
:exact evaluation using explicit expressions.
Sn
, signature(x = "GPareto")
:speeded up using interpolation grid.
Sn
, signature(x = "GEV")
:speeded up using interpolation grid.
Sn
, signature(x = "Gammad")
:speeded up using interpolation grid.
Sn
, signature(x = "Weibull")
:speeded up using interpolation grid.
Sn
, signature(x = "Pareto")
:speeded up using interpolation grid.
Qn
, signature(x = "Norm")
:exact evaluation using explicit expressions.
If any of the packages e1071, moments, fBasics is to be used together with distrEx
(or RobExtremes) the latter must be attached after any of the first mentioned.
Otherwise kurtosis()
and skewness()
defined as methods in distrEx (or RobExtremes) may get masked.
To re-mask, you may use
kurtosis <- distrEx::kurtosis; skewness <- distrEx::skewness
.
See also distrExMASK()
.
Peter Ruckdeschel [email protected]
Var
,sd
, var
, IQR
,median
, mad
, sd
,Sn
, Qn
# Variance of Exp(1) distribution G <- GPareto() var(G) #median(Exp()) IQR(G) ## note the timing system.time(print(Sn(GPareto(shape=0.5,scale=2)))) system.time(print(Sn(as(GPareto(shape=0.5,scale=2),"AbscontDistribution"))))
# Variance of Exp(1) distribution G <- GPareto() var(G) #median(Exp()) IQR(G) ## note the timing system.time(print(Sn(GPareto(shape=0.5,scale=2)))) system.time(print(Sn(as(GPareto(shape=0.5,scale=2),"AbscontDistribution"))))
Generates an object of class "WeibullFamily"
which
represents a Generalized Pareto family.
WeibullFamily(scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, withCentL2 = FALSE, withL2derivDistr = FALSE, ..ignoreTrafo = FALSE)
WeibullFamily(scale = 1, shape = 0.5, of.interest = c("scale", "shape"), p = NULL, N = NULL, trafo = NULL, start0Est = NULL, withPos = TRUE, withCentL2 = FALSE, withL2derivDistr = FALSE, ..ignoreTrafo = FALSE)
scale |
positive real: scale parameter |
shape |
positive real: shape parameter |
of.interest |
character: which parameters, transformations are of interest. |
p |
real or NULL: probability needed for quantile and expected shortfall |
N |
real or NULL: expected frequency for expected loss |
trafo |
matrix or NULL: transformation of the parameter |
start0Est |
startEstimator — if |
withPos |
logical of length 1: Is shape restricted to positive values? |
withCentL2 |
logical: shall L2 derivative be centered by substracting
the E()? Defaults to |
withL2derivDistr |
logical: shall the distribution of the L2 derivative
be computed? Defaults to |
..ignoreTrafo |
logical: only used internally in |
The slots of the corresponding L2 differentiable parameteric family are filled.
Object of class "WeibullFamily"
Matthias Kohl [email protected]
Peter Ruckdeschel [email protected]
Nataliya Horbenko [email protected]
Kohl, M. (2005) Numerical Contributions to
the Asymptotic Theory of Robustness. Bayreuth: Dissertation.
https://epub.uni-bayreuth.de/id/eprint/839/2/DissMKohl.pdf.
Kohl, M., Ruckdeschel, P., and Rieder, H. (2010):
Infinitesimally Robust Estimation in General Smoothly Parametrized Models.
Stat. Methods Appl., 19, 333-354.
doi:10.1007/s10260-010-0133-0.
Ruckdeschel, P. and Horbenko, N. (2013): Optimally-Robust Estimators in Generalized
Pareto Models. Statistics. 47(4),
762-791.
doi:10.1080/02331888.2011.628022.
Ruckdeschel, P. and Horbenko, N. (2012): Yet another breakdown point notion:
EFSBP –illustrated at scale-shape models. Metrika, 75(8),
1025–1047. doi:10.1007/s00184-011-0366-4.
L2ParamFamily-class
, Weibull-class
(G1 <- WeibullFamily()) FisherInfo(G1) checkL2deriv(G1)
(G1 <- WeibullFamily()) FisherInfo(G1) checkL2deriv(G1)