1
\name{computeTestKolmogorovGamma}
2
\alias{computeTestKolmogorovGamma}
3
\title{Compute the Kolmogorov-Smirnoff test on a Gamma Distribution sample.}
5
This ROT function, called from a Test C++ object, is given a sample,
6
a point, the necessary distribution parameters and optionnaly a test level. It then
7
returns the result of a K-S test against the null hypothesis that the sample
8
has un underlying Gamma distribution of the given parameters and returns
9
a list containing the result and test p-value.
12
computeTestKolmogorovGamma(numericalSample, k, lambda, gamma, testLevel = 0.95, estimatedParameters)
15
\item{numericalSample}{the sample to be tested (numeric vector)}
16
\item{k}{The Gamma distribution kParameter.}
17
\item{lambda}{The Gamma distribution lambdaParameter.}
18
\item{gamma}{The Gamma distribution gammaParameter.}
19
\item{testLevel}{the test level. (scalar in [0:1])}
20
\item{estimatedParameters}{the test level. (scalar in [0:1])}
23
A list is returned, containing :
24
\item{testResult}{The result. 1 means H0 is not rejected. (scalar)}
25
\item{threshold}{The threshold applied to the p-value when deciding the outcome of the test.}
26
\item{pValue}{The test p-value. (scalar)}
28
\author{Pierre-Matthieu Pair, Softia for EDF.}
30
# Standard Gamma distribution example.
32
print(computeTestKolmogorovGamma(rgamma(1000, 3, 1.5), 3, 1.5, 0))
33
print(computeTestKolmogorovGamma(rgamma(1000, 2.5, 1.5), 3, 1.5, 0))
35
# Non - Standard Gamma distribution example.
37
print(computeTestKolmogorovGamma(rgamma(1000, 3, 1.5) + 1, 3, 1.5, 1))
38
print(computeTestKolmogorovGamma(rgamma(1000, 3, 1.5) + 1, 3, 1.5, 0.5))
40
\keyword{distribution}