I have searched around but didn't have any luck. I am trying to estimate and then compare the DID estimates of the effect of a Treatment on Life-expectation across different Income levels, to know if Income impacts/moderates the effect of this Treatment on life-expectation.

I understand that one way to do this is: 1. categorize Income into different levels; 2.match the control and treated subjects in each income levels; 3. run a DID regression in each of the income levels, the DID regression looks like: Life-expectation = constant + Dummy(Treatment=1) + Time(time=1) +Treatment*Time + OtherControls + error, so that the coefficient of Treatment*Time estimate the effect in this income level. 4. compare the coefficients of Treatment*Time from different income levels

The challenge is how to avoid the arbitrary categorization of Income levels since Income is essentially a continuous variable in the population, not categorical in the nature. How to know the impact of a continuous variable, on the DID estimate of the effect of a Treatment? I guess a regression like the one below on the whole dataset does not give me what I want: Life-expectation = constant + Dummy(Treatment=1) + Time(time=1) +Treatment*Time + Income + OtherControls + error. But how to do it correctly?

Thanks in advance.