function to generate models using Linear Regression "LM"
genModel(y, deg = 1)
y
vector containing the data to fit
deg
degree of the polynomial fit