Learn R Programming

SkewHyperbolic (version 0.4-2)

skewhypTailPlotLine: 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"), ...)

Value

Returns NULL invisibly.

Arguments

x

A vector of values for which the tail plot has been drawn.

side

Character. "right" (the default) if the tail plot is of the right-hand tail, "left" if the tail plot is of the left-hand tail.

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
c(mu,delta,beta,nu).

...

Other graphical parameters (see par.

Author

David Scott d.scott@auckland.ac.nz

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.

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

Run this code
### 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")

Run the code above in your browser using DataLab