Returns a P value and visualizes for Kolmogorov-Smirnov test of Data versus a given Gauss Mixture Model
KStestMixtures(Data,Means,SDs,Weights,IsLogDistribution,PlotIt,UpperLimit,NoRepetitions,Silent)
List with
Pvalue of a suiting Kolmogorov-Smirnov test, Pvalue ==0 if Pvalue <0.001
such that plot(DataKernels,DataCDF) gives the cdf(Data)
such that plot(DataKernels,DataCDF) gives the cdf(Data)
No. of data that should be in bin according to GMM
vector of data points
vector of Means of Gaussians
vector of standard deviations, estimated Gaussian Kernels
vector of relative number of points in Gaussians (prior probabilities)
Optional, if IsLogDistribution(i)==1, then mixture is lognormal, default vector of zeros of length 1:L
Optional, Default: FALSE, do a Plot of the compared cdfs and the KS-test distribution (Diff)
Optional. test only for Data <= UpperLimit, Default = max(Data) i.e all Data.
Optional, default =1000, scalar, Number of Repetitions for monte carlo sampling
Optional, default=TRUE, If FALSE, shows progress of computation by points (On windows systems a progress bar)
Michael Thrun, Alfred Ultsch
The null hypothesis is that the estimated data distribution does not differ significantly from the GMM. If there is a significant difference, then the Pvalue is small and the null hypothesis is rejected.
Smirnov, N., Table for Estimating the Goodness of Fit of Empirical Distributions. 1948, (2), 279-281.