# Temporal features in survival analysis

I'm modeling customer churn, experimenting with both Aalen Additive and Cox Proportional Hazards models, using the lifelines package in Python. If this were a more typical machine learning model - one in which 'censorship' was not pertinent - I'd include temporal features like 'number of transactions in previous week,' 'average transactions over 1 week ago / average transactions over 2-3 weeks ago,' etc.

To fit the model, I have some observations in which a death event is observed, and others in which the customer is still, to date, 'alive.' As such, are the above types of features appropriate in these models? If so, how would you craft a feature that models something like * recent transaction velocity * ? Specifically, I can't quite wrap my head around how to represent this feature for an account that 'birthed' 12 months ago, and 'died' 6 months ago.

• Short pointer: time variant predictors/covariates. See perhaps stats.stackexchange.com/q/8375/16974 for a starter – James Stanley Jun 2 '15 at 23:13
• Time-varying covariates does the trick. Thanks James! – cavaunpeu Jun 4 '15 at 18:57