LikelihoodRatio4Mixtures: Likelihood Ratio for Gaussian Mixtures In AdaptGauss: Gaussian Mixture Models (GMM)

Description

Computes the likelihood ratio for two Gaussian Mixture Models.

Usage

 `1` ```LikelihoodRatio4Mixtures(Data,NullMixture,OneMixture,PlotIt,LowerLimit,UpperLimit) ```

Arguments

 `Data` Data points. `NullMixture` A Matrix: cbind(Means0,SDs0,Weights0) or cbind(Means0,SDs0,Weights0,IsLog0). The null model; usually with less Gaussians than the OneMixture `OneMixture` A Matrix: cbind(Means1,SDs1,Weights1) or cbind(Means1,SDs1,Weights1,IsLog1). The alternative model usually with more Gaussians than the OneMixture. `PlotIt` Optional: zero or one. o a Plot of the compared cdf's and the KS-test distribution (Diff) `LowerLimit` Optional: test only for Data >= LowerLimit, Default = min(Data) i.e all Data. `UpperLimit` Optional: test only for Data <= UpperLimit, Default = max(Data) i.e all Data.

Value

List with

 `Pvalue` the error that we make, if we accept OneMixture as the better Model over the NullMixture `NullLogLikelihood` log likelihood of GMM Null `OneLogLikelihood` log likelihood of GMM One

Author(s)

Alfred Ultsch, Michael Thrun, Catharina Lippmann

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ``` data2=c(rnorm(1000),rnorm(2000)+2,rnorm(1000)*2-1) ## Not run: Vals=AdaptGauss(data2,c(-1,0,2),c(2,1,1),c(0.25,0.25,0.5),0.3,-6,6) NullMixture=cbind(Vals\$Means,Vals\$SDs,Vals\$Weights) ## End(Not run) ## Not run: Vals2=AdaptGauss(data2,c(-1,0,2,3),c(2,1,1,1),c(0.25,0.25,0.25,0.25),0.3,-6,6) OneMixture=cbind(Vals2\$Means,Vals2\$SDs,Vals2\$Weights) ## End(Not run) ## Not run: res=LikelihoodRatio4Mixtures(Data,NullMixture,OneMixture,T) ## End(Not run) ```

AdaptGauss documentation built on March 26, 2020, 7:57 p.m.