# Number of components for Gaussian mixture model?

I have a vector of numeric values. My hypothesis is that this vector is a mixture drawn from two Gaussian distributions (ie k = 2). However, it is possible that there is only one Gaussian underlying my data (k = 1). I am attempting to answer this question in a data-driven manner but do not know the best method?

My thought was to compare the two methods by calculating the BIC or AIC for each, and then performing a log-likelihood test.

1. Should I include k as one of the parameters being estimated when I calculate BIC (ie {mu1, sd1, mu2, sd2, k} vs {mu1, sd1, k} for the 2-component and 1-component models respectively)

2. I'm using the mixtools package in R and the normalmixEM() function does not seem to allow fitting a 1-component gaussian (ie if I use k = 1 I get an error arbmean and arbvar cannot both be FALSE)

3. If using a LR with AIC/BIC is not appropriate, is there a more appropriate solution to this problem?

Edit: I found a somewhat illuminating example here. This approach uses the mclust package to fit a 1 vs 2 component gaussian mixture and use the model log-likelihood to perform a likelihood ratio test.

• This paper and this paper should be helpful, they also have a R package: MixtureInf Commented Dec 20, 2017 at 13:26
• Those are indeed helpful, many thanks! I will take a look at their implementation in the package. Commented Dec 20, 2017 at 17:02
• @Brandon, were you able to figure out how to implement these packages to find the ideal number of distributions to use? Commented Jul 25, 2022 at 19:34
• @MaxF It's been a while and no longer involved in that lab so I don't recall exactly how I resolved it. I believe I ended up using the mclust approach from the link I provided in the original post edit. Commented Jul 25, 2022 at 21:23

Since you're working with R, I recommend you take a look at the nortest package.