Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot-lines-methods

Plot univariate generalized hyperbolic densities


Description

These functions plot probability densities of generalized hyperbolic distribution objects.

Usage

## S4 method for signature 'ghyp,missing'
plot(x, range = qghyp(c(0.001, 0.999), x), length = 1000, ...)
## S4 method for signature 'ghyp'
lines(x, range = qghyp(c(0.001, 0.999), x), length = 1000, ...)

Arguments

x

An univariate ghyp object.

range

The range over which the density will be plotted. The default is the range from the 0.1 % quantile to the 99.9 % quantile. When range has a length greater than 2 it is assumed to be the vector of quantiles and the density is computed on range.

length

The desired length of the density vector.

...

Arguments passed to plot and lines respectively.

Details

When the density is very skewed, the computation of the quantile may fail. See qghyp for details.

Author(s)

David Luethi

See Also

Examples

data(smi.stocks)

  smi.fit   <-  fit.tuv(data = smi.stocks[,"SMI"], symmetric = TRUE)
  nestle.fit <- fit.tuv(data = smi.stocks[,"Nestle"], symmetric = TRUE)

  ## Student-t distribution
  plot(smi.fit, type = "l", log = "y")
  lines(nestle.fit, col = "blue")

  ## Empirical
  lines(density(smi.stocks[,"SMI"]), lty = "dashed")
  lines(density(smi.stocks[,"Nestle"]), lty = "dashed", col = "blue")

ghyp

Generalized Hyperbolic Distribution and Its Special Cases

v1.6.1
GPL (>= 2)
Authors
Marc Weibel, David Luethi, Wolfgang Breymann
Initial release
2020-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.