KStestMixtures {AdaptGauss} | R Documentation |
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,Silent)
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 <= UpperLimit, Default = max(Data) i.e all Data. |
Silent |
Optional, default=TRUE, If FALSE, shows progress of computation by points (On windows systems a progress bar) |
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.
List with
Pvalue |
Pvalue of a suiting Kolmogorov-Smirnov test, Pvalue ==0 if Pvalue <0.001 |
DataKernels |
such that plot(DataKernels,DataCDF) gives the cdf(Data) |
DataCDF |
such that plot(DataKernels,DataCDF) gives the cdf(Data) |
CDFGaussMixture |
No. of data that should be in bin according to GMM |
Michael Thrun, Alfred Ultsch
Smirnov, N., Table for Estimating the Goodness of Fit of Empirical Distributions. 1948, (2), 279-281.