Carry out a Cr<e4>mer-von~Mises test of a hyperbolic distribution where the parameters of the distribution are estimated, or calculate the p-value for such a test.
hyperbCvMTest(x, mu = 0, delta = 1, alpha = 1, beta = 0,
param = c(mu, delta, alpha, beta),
conf.level = 0.95, ...)
hyperbCvMTestPValue(delta = 1, alpha = 1, beta = 0, Wsq, digits = 3)
# S3 method for hyperbCvMTest
print(x, prefix = "\t", ...)
A numeric vector of data values for hyperbCvMTest
, or
object of class "hyperbCvMTest"
for print.hyperbCvMTest
.
\(\mu\) is the location parameter. By default this is set to 0.
\(\delta\) is the scale parameter of the distribution. A default value of 1 has been set.
\(\alpha\) is the tail parameter, with a default value of 1.
\(\beta\) is the skewness parameter, by default this is 0.
Parameters of the hyperbolic distribution taking the form
c(mu, delta, alpha, beta)
.
Confidence level of the the confidence interval.
Further arguments to be passed to or from methods.
Value of the test statistic in the Cr<e4>mer-von~Mises test of the hyperbolic distribution.
Number of decimal places for p-value.
Character(s) to be printed before the description of the test.
hyperbCvMTest
returns a list with class hyperbCvMTest
containing the following components:
The value of the test statistic.
A character string with the value “Cr<e4>mer-von~Mises test of hyperbolic distribution”.
A character string giving the name(s) of the data.
The value of the parameter param
The p-value of the test.
A warning if the parameter values are outside the limits of the table given in Puig & Stephens (2001).
hyperbCvMTestPValue returns a list with the elements p.value and warn only.
hyperbCvMTest
carries out a Cr<e4>mer-von~Mises
goodness-of-fit test of the hyperbolic distribution. The parameter
param
must be given in the \((\alpha, \beta)\)
parameterization.
hyperbCvMTestPValue
calculates the p-value of the test, and is
not expected to be called by the user. The method used is
interpolation in Table 5 given in Puig & Stephens (2001), which
assumes all the parameters of the distribution are unknown. Since the
table used is limited, large p-values are simply given as
“>~0.25” and very small ones as “<~0.01”. The table is
created as the matrix wsqTable
when the package
GeneralizedHyperbolic
is invoked.
print.hyperbCvMTest
prints the output
from the
Cr<e4>mer-von~Mises goodness-of-fit test for
the hyperbolic distribution in very similar format to that provided by
print.htest
. The only reason for having a special print method
is that p-values can be given as less than some value or greater than
some value, such as “<\ ~0.01”, or “>\ ~0.25”.
Puig, Pedro and Stephens, Michael A. (2001), Goodness-of-fit tests for the hyperbolic distribution. The Canadian Journal of Statistics/La Revue Canadienne de Statistique, 29, 309--320.
# NOT RUN {
param <- c(2, 2, 2, 1.5)
dataVector <- rhyperb(500, param = param)
fittedparam <- hyperbFit(dataVector)$param
hyperbCvMTest(dataVector, param = fittedparam)
dataVector <- rnorm(1000)
fittedparam <- hyperbFit(dataVector, startValues = "FN")$param
hyperbCvMTest(dataVector, param = fittedparam)
# }
Run the code above in your browser using DataLab