Description Usage Format Author(s) Examples
These objects store different parameter sets of the Generalized
Hyperbolic distribution for testing or demonstrating purpose as
matrices. Specifically, the parameter sets ghypSmallShape and
ghypLargeShape have a constant location parameter of
mu = 0. The shape parameter lambda will
vary from (-1, -0.5, 0, 1, 1.5) in ghypSmallShape and
(-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2) in ghypLargeShape.
The parameter alpha varies from (0, 0.5, 1) in
ghypSmallShape and (0, 0.5, 1, 1.5, 2) in ghypLargeShape.
In ghypSmallShape the set of values for the beta
parameter are (0, 0.5, 1), while in ghypLargeShape they are
(0, 0.5, 1, 1.5, 2). The delta parameter will vary
from (0, 0.5, 1) in ghypSmallShape and (0, 0.5, 1, 1.5, 2) in
ghypLargeShape.
The parameter sets ghypSmallParam and ghypLargeParam have varied
values of all 5 parameters. The only difference between these datasets and
those of ghypSmallShape and ghypLargeShape are that these also
vary the mu parameter. In ghypSmallParam this variation is
between (-2, 0, 2) as is also the case in ghypLargeParam.
Note that not all parameter variations may be apparent due to the validity of their combinations.
1 2 3 4 |
ghypSmallShape: a 24 by 5 matrix;
ghypLargeShape: a 200 by 5 matrix;
ghypSmallParam: a 72 by 5 matrix;
ghypLargeParam: a 600 by 5 matrix.
Simon Potter spot023@aucklanduni.ac.nz
1 2 3 4 5 6 7 8 9 10 | data(ghypParam)
## Testing the accuracy of ghypMean
for (i in 1:nrow(ghypSmallParam)) {
param <- ghypSmallParam[i, ]
x <- rghyp(1000, param = param)
sampleMean <- mean(x)
funMean <- ghypMean(param = param)
difference <- abs(sampleMean - funMean)
print(difference)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.