spacings | R Documentation |
Methods computing the random spacings for the Largest Order Statistics of the marks in a POT renewal.
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, ...)
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. |
The spacings are the differences between the Largest Order
Statistics. They are useful for some estimation tasks or diagnostics.
Given random variables X_i
, the i
-th spacing Y_i
is
the difference X_{(i)}-X_{(i+1)}
between the i
-th largest
order statistic X_{(i)}
and the next in the decreasing order
i.e. X_{(i+1)}
.
When the r.vs X_i
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 i \times
Y_i
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 r-1
spacings Y_i
built from the
r
largest order statistics i \le r
are or tend to be
independent from the r
-th largest order statistic X_{(r)}
.
When wExp
is TRUE
, the returned values are the weighted
spacings i \times Y_i
.
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.
By default, the spacings are scaled as explained above, thus assuming that the marks are exponentially distributed.
Yves Deville
Embrechts P., Klüppelberg C. and Mikosch T. (1997) Modelling Extremal Events for Insurance and Finance. Springer.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.