plot-lines-methods {ghyp} | R Documentation |
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 |
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 |
length |
The desired length of the density vector. |
... |
Details
When the density is very skewed, the computation of the quantile
may fail. See qghyp
for details.
Author(s)
David Luethi
See Also
hist
, qqghyp
,
pairs
, plot
,
lines
.
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")
[Package ghyp version 1.6.4 Index]