Learn R Programming

AdaptGauss (version 1.2.0)

KStestMixtures: Kolmogorov-Smirnov test

Description

Returns a P value and visualizes for Kolmogorov-Smirnov test of Data versus a given Gauss Mixture Model

Usage

KStestMixtures(Data,Means,SDs,Weights,IsLogDistribution,PlotIt,UpperLimit)

Arguments

Data
vector of data points
Means
vector of Means of Gaussians
SDs
vector of standard deviations, estimated Gaussian Kernels
Weights
vector of relative number of points in Gaussians (prior probabilities)
IsLogDistribution
Optional, if IsLogDistribution(i)==1, then mixture is lognormal, default vector of zeros of length 1:L
PlotIt
Optional, Default: FALSE, do a Plot of the compared cdfs and the KS-test distribution (Diff)
UpperLimit
Optional. test only for Data

Value

  • List with
  • PvaluePvalue of a suiting Kolmogorov-Smirnov test, Pvalue ==0 if Pvalue <0.001< description="">
  • DataKernelssuch that plot(DataKernels,DataCDF) gives the cdf(Data)
  • DataCDFsuch that plot(DataKernels,DataCDF) gives the cdf(Data)
  • CDFGaussMixtureNo. of data that should be in bin according to GMM

Details

...

References

Smirnov, N., Table for Estimating the Goodness of Fit of Empirical Distributions. 1948, (2), 279-281.