I have data that I want to fit with a constant plus a combination of Gaussians, with their actual number being one parameter of the fit (besides the average and the variance of every one of them).
How can I carry out and test such procedure in Mathematica?
If fitting discrete values is not possible, how can implement a series of fits for different number of Gaussians and a selection criteria the best fit?
A representative example of the data:
dat = Uncompress@Import["http://pastebin.com/raw.php?i=VHZ7XJAi"];
ListPlot[dat, PlotRange -> All, PlotTheme -> "Scientific"]