tailplot | R Documentation |
tailplot
generates the tail plot and Hill plot for the input data
tailplot(x, tail.prop = 0.05, left = TRUE, right = TRUE, show.lines = TRUE, lines = 16, line.order = 3, tail.plot = TRUE, hill.plot = FALSE, dsm.plot = FALSE, point.size = 3, point.alpha = 0.4, point.color = NULL, point.colour = point.color, line.color = NULL, line.colour = line.color, ytop.mult.left = 3, ytop.mult.right = 3)
x |
Data vector (numeric) |
tail.prop |
The proportion of values to use in each tail |
left |
Logical; if |
right |
Logical; if |
show.lines |
Logical; if |
lines |
Number of lines to include in the plot (included if |
line.order |
Order of the lines in the plot (included if |
tail.plot |
Logical; if |
hill.plot |
Logical; if |
dsm.plot |
Logical; if |
point.size |
Size of the points in the plots |
point.alpha |
Alpha-transparency of the points in the plots |
point.color, point.colour |
Colour of the points in the plots (default is blue) |
line.color, line.colour |
Colour of the lines in the plots (default is darkred) |
ytop.mult.left |
Multiplier used to determine the height of axis for left Hill/DSM plots |
ytop.mult.right |
Multiplier used to determine the height of axis for right Hill/DSM plots |
The tail plot for a dataset shows the rate of decay of the tails in the data. It is used to diagnose whether certain moments of the underlying distribution exist (e.g., the variance), which is used in turn to determine whether certain statistical laws apply to the distribution (e.g., the central limit theorem). The Hill plot shows the adjusted Hill estimator for the tail index of the distribution. The DSM (De-Sousa-Michailidis) plot shows the adjusted DSM estimator for the tail index of the distribution. These latter estimators are very similar; more details are found in the reference below. Our adjusted versions of these estimators are computed using data for the left and right deviations from the extreme values of the dataset; this is done to ensure that the estimators are shift-invariant (the standard Hill and DSM estimators are not).
The present function produces tail plots and Hill/DSM plots for the input data vector to show the rate of decay in the tails. By default, both the tails are shown, but the user can show the plots only for one tail if preferred. The user can turn any of the plots on or off using the inputs to the function.
By default, the tail plot includes lines showing cubic decay in the tails — if the tails of the distribution decay faster than cubic decay then the variance of the distribution exists. The user can change the order of the lines in the plot to show other decay orders; this can be used to diagnose the existence of moments of other orders.
De Sousa, B. and Michailidis, G. (2004) A Diagnostic Plot for Estimating the Tail Index of a Distribution. Journal of Computational and Graphical Statistics 13(4), pp. 1-22.
Tail plots for the input data (and Hill plots or DSM plots if requested)
try(tailplot(rnorm(500)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.