In a Cox PH model, how to give more importance to behavior of recent entries? I have a dataset starting from 2015 to the current time. There is no complexity of "delayed entry". Now whenever a person subscribe to my company, they are instantly enrolled into my dataset. My task is to predict the lifetimes of these customers, using a right censored dataset.
Initially, my company outsourced the problem to a big firm, which came up with Kaplan-Meier curves. First, the decay rates (% change in customer when moving from time t to t+1) were found and then weighted by the recency of the customer. For example, more weight would be given to the decay rate of customers who join in 2022 than to those who join in 2017. Then this weighted decay rate would be used to generate a KM curve.
What I am currently using is a Cox PH model with a breslow estimator, since I need to deal with multiple covariates. To give more importance to recent data, I can oversample/undersample before training. But instead of using a "prior" weighting scheme, I want the model to decide the weighting. My goal is to predict the lifetimes of new customers  (joining in 2022)
I tried using a "Year" as covariate but then the data for customers who joined in 2022 is 1) very low and 2) gets censored or event happens in a short span. I was thinking that this might not be the right way.
Done in Python, using Lifelines


I tried using a "Year" as covariate but then the data for customers who joined in 2022 is 1) very low and 2) gets censored or event happens in a short span.

That will pose a problem however you might "weight" the more recent customers. Furthermore, even if you "want the model to decide the weighting," you would have to specify criteria for that decision. Insofar as you focus only on the most recent customers for validating predictions so that the model might decide the weighting, you still come up against the problem of having relatively few recent customers and thus a relatively unreliable validation set.
It would make the most sense to include the calendar date of entry as a covariate, flexibly modeled with a regression spline as Frank Harrell suggests in a comment. It would be best to use the actual date of entry rather than binning according to calendar year. That will include not only the data you have on recent customers but also all your customers dating back to 2015.
With calendar date modeled as a flexible spline you don't have the same problems with few recent customers as you have with year treated as a categorical predictor. The new customers provide what information they can, but you don't depend solely on them for estimating any specific regression coefficient.
I see two general types of results.
One is that there is no strong association between calendar date of entry and customer lifetime. In that case all customers provide information directly related to the expected lifetimes of new customers. There's no need to "weight" the newer customers at all. You can't rule out some unexpected turn of events that might invalidate the predictions, but that's the best you can do with the data you have.
The other is that there is some trend with respect to calendar date of entry. Then you have to make a decision about whether to trust extrapolating the trend to cover new customers. That's a business decision, not strictly a statistical issue.
