spacings {Renext} | R Documentation |
Methods computing spacings between Largest Order Statistics
Description
Methods computing the random spacings for the Largest Order Statistics of the marks in a POT renewal.
Usage
spacings(object, ...)
## S3 method for class 'numeric'
spacings(object, wExp = TRUE, ...)
## S3 method for class 'data.frame'
spacings(object, varName, wExp = TRUE, ...)
## S3 method for class 'Rendata'
spacings(object, type = c("MAX", "OTS", "OT"), wExp = TRUE, ...)
Arguments
object |
A object containing the marks |
varName |
Character vector of length 1 giving the name of the variable when
|
wExp |
Logical. If |
type |
Character specifying the data.frame to be used when object has class
|
... |
Not used yet. |
Details
The spacings are the differences between the Largest Order
Statistics. They are useful for some estimation tasks or diagnostics.
Given random variables , the
-th spacing
is
the difference
between the
-th largest
order statistic
and the next in the decreasing order
i.e.
.
When the r.vs form a sample of an exponential or Gumbel
distribution, the spacings associated with the largest order
statistics are or tend to be independent and exponentially
distributed. More precisely, the weighted spacings
have or tend to have the same exponential
distribution. This can be used to estimate the shape parameter of the
underlying distribution using only the largest order
statistics. Moreover the
spacings
built from the
largest order statistics
are or tend to be
independent from the
-th largest order statistic
.
When wExp
is TRUE
, the returned values are the weighted
spacings .
Value
A list or vector containing the spacings. When the data is structured
in blocks as is the MAXdata
slot of an object of class
"Rendata"
, the spacings are computed form the order statistics
within each block, to maintain independence with the next order
statistic in decreasing order.
Caution
By default, the spacings are scaled as explained above, thus assuming that the marks are exponentially distributed.
Author(s)
Yves Deville
References
Embrechts P., Klüppelberg C. and Mikosch T. (1997) Modelling Extremal Events for Insurance and Finance. Springer.
Examples
sp <- spacings(rgumbel(200, loc = 0, scale = 1))
expplot(sp)
sp1 <- spacings(rgev(200, loc = 0, scale = 1, shape = 0.3))
expplot(sp1)
## spacings are computed by block
sp2 <- spacings(object = Garonne$MAXdata,
varName = Garonne$info$varName)
expplot(unlist(sp2))
sp3 <- spacings(object = Garonne, type = "OT")
expplot(sp3)