time_lm function

Subset data by time and perform a linear regression.