A very interesting paradigm in data analysis comes from the necessity to model data where it is difficult to think of a single global function to be capable to represent adequately the data.

We could see a spectrum of models going from the global statistical model, with a single function and associated probability distribution, to the decision tree fitting a set of constants at each leaf of the tree.

This articles focuses in models which combine the two extrema to yield a more parsimonious solution and, at the same time, try to get the best of both approaches.

We shall present two of the best representatives of the above mentioned approach, the party package which combines the decision tree with local models fitted at the leaves of the tree and the Flexmix package, implementing a solution based on a mixture of models (a soft approach).