changed lm call to use a formula which is automatically generated
assuming the 1st column of 'dat' is the response.