I have longitudinal transaction data of a retail store where each row is a transaction done by an individual. I would like to perform a survival analysis to analyse how long a customer will transact before churning. Here I am defining churn as someone who has not made any transaction in last 3 months from current time. I am planning to use Cox Proportional Hazard Model, it requires tenure or time_to_event parameter. What is the correct way to represent tenure in this case of churn for below data
Below is the sample of data
Id. Visit_date. Amount. Tenure Churn Age Income
1. 04/03/2020 500 ? No 40 56K
1. 05/03/2020 300 ? No 32 60K
1. 05/23/2020 800 ? No 28 90K
1. 07/04/2020 700 ? No 40 56K
2. 02/03/2020 500 ? Yes 43 50K
2. 01/12/2020 300 ? Yes 60 90K
3. 03/23/2020 800 ? No 18 80K
4. 07/04/2020 700 ? No 20 40K
What is the correct way to put Time_to_event or Tenure value for CoxPH model?