# Survival analysis - different start times

I am doing a survival analysis on vending machines based on their time to failure.

However, my machines are deployed in 4 main locations, machines are all installed at a different time depending on location.

Do I need to include the machine's start date as a feature in my model? Or do library models like those provided by pysurvival only need to know the time to failure regardless of installation date?

If you feel that the machine's reliability is correlated to start date (for example, due to improved installation experience), then yes, you should include it as a feature (probably as a start date - <some arbitrary date>-like variable).

(Note this does not change your duration of event-occurred variables)

It often helps to think about human health when using survival analysis, as that domain is very familiar to us. If you had a dataset of individuals' lifespans from 1800s to now, the year (or decade) they were born really would effect lifespans, since, for example, the impact of early childhood diseases have changed significantly over time.

• Would it also be possible to identify different regimes (e.g. strucutural breaks) based on the start date? I am working with a dataset where I have durations measured over multiple years, and am wondering whether structural changes have occurred.
– John
Jul 15, 2023 at 8:04
• Sure, if you encode the start date correctly and have enough statistical power, you could detect structural changes. Jul 16, 2023 at 12:50
• How would I do that? And how to correctly encode the start date? Could you perhaps refer me to some literature where they do something like this?
– John
Jul 16, 2023 at 16:24
• The durations I work with are typicall just seconds or minutes. But I have these durations for multiple years of data. Essentially I want to see if anything structurally has changed in the durations.
– John
Jul 16, 2023 at 16:38
• You are interested in a (possibly non-linear) effect of the time when the test was run. You can encode the time as a linear function, b-spline, or something else. This variable goes into your regression model. You are then testing if the coefficients are non-zero (which would imply an effect of run time on survival). Jul 16, 2023 at 21:32