R Under development (unstable) (2023-11-23 r85618 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > require(SkewHyperbolic) Loading required package: SkewHyperbolic > ## source("../R/skewhypTailPlotLine.R") > tailPlot <- DistributionUtils :: tailPlot ## for convenience below > ### Draw tail plot of some data > param <- c(0,1,2,10) > set.seed(101, kind = "default", normal.kind = "default") > x <- rskewhyp(500, 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 Data: x Parameter estimates: mu delta beta nu -0.1306 1.0406 3.5865 12.2400 Likelihood: -196.934 Method: Nelder-Mead Convergence code: 0 Iterations: 463 > 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") > > > proc.time() user system elapsed 0.62 0.04 0.65