I'm trying to use a regression model to understand if the time between a person having a positive test for a disease and then getting admitted to hospital is changing. It is a panel model with the cross section being people of different ages. If dt is the date then I want to estimate something like (in pseudocode):

Code:
regress hospitalised i.age d([x]dt#i.age).positivetest
where [x] would be some coefficient on the lag that changes over time. So it might be 8 days at the beginning of the time series but 5 days at the end.

Is this possible with Stata and could anyone advise how please?

Thanks
Rob