skewhypTailPlotLine {SkewHyperbolic} | R Documentation |
Adds skew hyperbolic t-distribution line to a tail plot
skewhypTailPlotLine(x, mu = 0, delta = 1, beta = 1, nu = 1, param = c(mu,delta,beta,nu), side = c("right", "left"), ...)
x |
A vector of values for which the tail plot has been drawn. |
side |
Character. |
mu |
Location parameter mu, default is 0. |
delta |
Scale parameter delta, default is 1. |
beta |
Skewness parameter beta, default is 1. |
nu |
Shape parameter nu, default is 1. |
param |
Specifying the parameters as a vector of the form |
... |
Other graphical parameters (see |
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.
Returns NULL
invisibly.
David Scott d.scott@auckland.ac.nz
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.
tailPlot
and
skewhypFit
.
### 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")