# Use an arbitrary number of features to predict an individuals life expectancy

Objective

I want to predict someone's life expectancy (age they will die) based on their lifestyle, current conditions, medications, biomarkers etc.

Limitations of supervised learning

There are no datasets to directly predict life expectancy with a supervised learning model. This is because if you limit your training data to only those with a known age of death, then the age of death for any age is limited to the study follow-up time. For example, for the epidemiological dataset NHANES 3, the follow-up time is currently ~25 years so the only young people with included in the model will probably have died prematurely introducing bias.

Limitations of survival analysis

An alternate modelling approach would be to use survival analysis to estimate all-cause mortality i.e. death from any cause. For example, a cox-proportional hazards model. However, this can give the probability of death within a given time-frame for a given set of covariates or the hazard ratios for different features but it is not clear how to transform these into a life expectancy estimate for each sample.

Limitations of life tables

Life expectancy can be directly estimated from life tables or survival curves (e.g. Kaplan-Meier), however this can only estimate life expectancy for groups of individuals e.g. smokers and non-smokers and not individuals.

Questions

1. Is there anything I've said here that is incorrect?

2. Is there any method to achieve my objective?

I want to predict someone's life expectancy (age they will die) based on their lifestyle, current conditions, medications, biomarkers etc.

That's not quite what survival analysis provides. Even an "individual" survival prediction is best considered a prediction of a survival curve over time. You can often get things like median or mean survival times, but the survival-time distributions around those specific values is typically quite broad.

for the epidemiological dataset NHANES 3, the follow-up time is currently ~25 years so the only young people with included in the model will probably have died prematurely introducing bias.

In the context of the preceding, you have to be more precise about what you mean by "bias." There is not an inherent bias in estimating the survival curve up through the times available in the data. If a group of interest has gone to below 50% survival, for example, you get an estimate of median survival for members of that group.

Mean survival (what's usually meant by "life expectancy") is trickier. With a Cox model, for example, unless the last observation time is an event you cannot get a true mean survival estimate as you don't know the distribution of event times after the last observed one. Parametric models can give mean survival, but the results depend on validity of the assumed underlying probability distribution.

a Cox proportional hazards model... can give the probability of death within a given time-frame for a given set of covariates... but it is not clear how to transform these into a life expectancy estimate for each sample.

A model can only provide survival estimates for covariates that were modeled. A model, however, can in principle be combined with other survival information. That leads to:

Life expectancy can be directly estimated from life tables or survival curves...

which can, in principle, be combined with information from more detailed models for specific covariates. Based on the first paragraph of this answer, you shouldn't be too worried about the apparent "individual" versus "group" differences. When death is the event, an individual only gets one draw from the probability distribution.

I find it best to think about even an individual survival curve as representing the expected experience of a group of individuals having the same set of covariate values. That's particularly important when covariate values can change over time; Therneau and Grambsch use such a hypothetical cohort in Section 10.2.4 to explain why they (unlike others) sometimes support making survival predictions in such circumstances.

So what you want to accomplish might best be considered like the "Cohort survival" analysis that Therneau and Grambsch go on to explain in Section 10.3:

when measurements have been made on a cohort of study subjects and the question arises as to whether the lifetimes are greater than, less than, or similar to what would be expected in the general population or in some other comparison group.

If a randomized study isn't possible,

investigators often turn to historical or nonconcurrent controls to estimate an expected event rate in the cohort of interest. A key assumption in such an analysis, of course, is that the historical control is appropriate, that is, that the survival experience of the historical group is exactly the survival we would have observed, had a control group actually been recruited.

This best starts by choosing a "subject i of the study population, drawn from a population table, and matched with subject i based on age, sex, and other relevant factors." They discuss several ways to make such estimates. In particular, the Hakulinen estimate avoids problems that can be introduced by non-independence of censoring with respect to age, sex, etc:

each study subject is again paired with a fictional referent from the cohort population, but this referent is now treated as though he or she were followed up in the same way as the study patient.

The success of such an approach, however, depends on how well the life table represents the baseline survival for the specific group of interest.