Combining regression with the sliding window