skewhypTailPlotLine {SkewHyperbolic} | R Documentation |
Tail Plot Line
Description
Adds skew hyperbolic t-distribution line to a tail plot
Usage
skewhypTailPlotLine(x, mu = 0, delta = 1, beta = 1, nu = 1,
param = c(mu,delta,beta,nu),
side = c("right", "left"), ...)
Arguments
x |
A vector of values for which the tail plot has been drawn. |
side |
Character. |
mu |
Location parameter |
delta |
Scale parameter |
beta |
Skewness parameter |
nu |
Shape parameter |
param |
Specifying the parameters as a vector of the form |
... |
Other graphical parameters (see |
Details
The function tailPlot
from DistributionUtils can be used
to draw either a left-hand or right-hand tail plot of
the data x
. See for example Resnick (2007), p.105. The
left-hand tail plot plots the empirical distribution of the data
against the order statistics, for order statistic values below the
median. The right-hand tail plot plots one minus the empirical
distribution of the data against the order statistics, for order
statistic values above the median. The default is for the y-axis to be
plotted on a log scale.
skewhypTailPlotLine
adds the line derived from the given skew
hyperbolic t-distribution to an already drawn tail plot.
Value
Returns NULL
invisibly.
Author(s)
David Scott d.scott@auckland.ac.nz
References
Aas, Kjersti and Hobæk Haff, Ingrid (2006)
The generalised hyperbolic skew Student's t
-distribution.
Journal of Financial Econometrics, 4, 275–309.
Resnick, S. (2007) Heavy-Tail Phenomena, New York: Springer.
See Also
tailPlot
and
skewhypFit
.
Examples
### Draw tail plot of some data
tailPlot <- DistributionUtils :: tailPlot ## for convenience below
param <- c(0,1,1,10)
x <- rskewhyp(200, param = param)
tailPlot(x)
### Add skew hyperbolic t-distribution line
skewhypTailPlotLine(x, param = param)
### Parameters from fit may look better
paramFit <- skewhypFit(x, plots = FALSE)$param
tailPlot(x)
skewhypTailPlotLine(x, param = param)
skewhypTailPlotLine(x, param = paramFit, col = "steelblue")
### Left tail example
tailPlot(x, side = "l")
### Add skew hyperbolic t-distribution line
skewhypTailPlotLine(x, param = paramFit, side = "l")
### Log scale on both axes
tailPlot(x, side = "r", log = "xy")
### Add skew hyperbolic t-distribution line
skewhypTailPlotLine(x, param = paramFit, side = "r")