computeTestKolmogorovTruncatedNormal {rotRPackage}R Documentation

Compute the Kolmogorov-Smirnoff test on a TruncatedNormal Distribution sample.

Description

This ROT function, called from a Test C++ object, is given a sample, a point, the necessary distribution parameters and optionnaly a test level. It then returns the result of a K-S test against the null hypothesis that the sample has un underlying TruncatedNormal distribution of the given parameters and returns a list containing the result and test p-value.

Usage

computeTestKolmogorovTruncatedNormal(numericalSample, mu, sigma, a, b,
testLevel = 0.95, estimatedParameters)

Arguments

numericalSample the sample to be tested (numeric vector)
mu The TruncatedNormal distribution mu.
sigma The TruncatedNormal distribution sigma.
a The TruncatedNormal distribution aParameter.
b The TruncatedNormal distribution bParameter.
testLevel the test level. (scalar in [0:1])
estimatedParameters the test level. (scalar in [0:1])

Value

A list is returned, containing :

testResult The result. 1 means H0 is not rejected. (scalar)
threshold The threshold applied to the p-value when deciding the outcome of the test.
pValue The test p-value. (scalar)

Author(s)

Pierre-Matthieu Pair, Softia for EDF.

Examples

# Standard TruncatedNormal distribution example. (a=0, b=1)
sample <- rnorm(1000, 2, 4)
sample <- sample[sample > -4 && sample < 6]
print(computeTestKolmogorovTruncatedNormal(sample, 2, 4, -4, 6))
print(computeTestKolmogorovTruncatedNormal(sample, 1.5, 4, -4, 6))

[Package rotRPackage version 1.4.3 Index]