lm2fit function

Fits the specified model and computes stats