I've been trying to fit a Gaussian Mixture Model (GMM) for a univariate distribution where each observation has an assigned weight (from 0 to 1).
Assigning weights can be easily done for the basic 'density' function (from 'stats'), but I could not do this for GMM packages as 'mixtools' or 'mclust'.
The latter even has a function for that - 'me.weighted' - exemplified in the link "http://cran.open-source-solution.org/web/packages/mclust/vignettes/mclust-weights.pdf", but I can't get it to work. Both in their example and in my data I get an error:
> fitnew <- do.call("me.weighted", c(list(data = X, weights = w), fit))
Error in me.weighted(data = list(Sepal.Length = c(5.1, 4.9, 4.7, 4.6, : formal argument "data" matched by multiple actual arguments