I have a data frame "customers" build of customer id, month and total purchases that month. I have calculated a running slope of total purchases (window of 12 months) for each customer. The thing is, there are customers that the trend of the slope contradicts business logic. Consider the following vector of purchases - a customer doesn't buy anything for the first 11 months and then buys, 100, 50 and finally 4
c(0,0,0,0,0,0,0,0,0,0,0,100,50,4)
meaning that if t=present time, these will be the vectors for rlm and their respective slopes:
t = c(0,0,0,0,0,0,0,0,0,100,50,4)
rlm_slope = 0.4541076
t_minus1 = c(0,0,0,0,0,0,0,0,0,0,100,50)
rlm_slope = 0.4478227
t_minus2 = c(0,0,0,0,0,0,0,0,0,0,0,100)
rlm_slope = 0.0003052124
So the slope increases though from business POV customer's performance deteriorates. How can I go around this? Is there a general solution that will include other customers?