> For the complete documentation index, see [llms.txt](https://docs.finngen.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finngen.fi/finngen-data-specifics/endpoints/complete-follow-up-time-of-the-finngen-registries-primary-endpoint-data/survival-analysis-using-the-truncated-endpoint-file-secondary-endpoint-data.md).

# Survival analysis using the truncated endpoint file – secondary endpoint data

In addition to the regular endpoint files of DF9 (and subsequent data freezes), the register team will release a separate file for survival analyses. It is the so-called “truncated” endpoint datafile in which the common follow-up end date is 31.12.2019 (for DF9) for all of the registers (Figure 2). This is the last date to which the follow-up reaches in all registers included in the [detailed longitudinal](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/detailed-longitudinal-data.md) and [endpoint data](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/endpoint-and-endpoint-longitudinal-data.md). When the follow-up is truncated for all registers to end at the same time, it becomes possible to see the complete disease status of the individuals even in the latest follow-up years.

![](/files/9sWbZRnFhNsQkihtw1lZ)

### **Survival analysis using the truncated endpoint file**

Each endpoint in the [Endpoint data](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/endpoint-and-endpoint-longitudinal-data.md) contains the variable “ENDPOINT\_AGE", which is a pre-calculated variable that contains individuals' ages at:

**Cases:** first recorded EVENT\_AGE

**Controls:**

\- [FU\_END\_DATE](/finngen-data-specifics/endpoints/complete-follow-up-time-of-the-finngen-registries-primary-endpoint-data.md) (DF9: 31.12.2019, in the truncated endpoint file)

**OR**

\- Age at death (if deceased – and even if moved abroad at some point)

**OR**

\- Age at emigration (if moved abroad, and not deceased).

Survival analysis can be run using the variables BL\_AGE (age when each individual has entered the study, i.e. donated DNA sample), ENDPOINT\_AGE and a 1/0 indicator for the ENDPOINT.

BL\_AGE is the age at which each individual has entered the study. Most of the individuals have joined the study after all follow-up register data has been made available (Figure 2). The exceptions are the [primary care register Avohilmo](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md#avohilmo-register-of-primary-health-care-visits) (with the beginning of the follow-up in 2011), the [specialist outpatient Hilmo registry](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md#hilmo-care-register-for-health-care) (1998) and the [Kela drug purchase register](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md#drug-purchase-data-the-social-insurance-institution-of-finland-kela-kansanelaekelaitos) (1995), for which the follow-up may have begun after the individual joined the study. This small bias, that a small portion of the events go undetected (false negative) or that their first recorded EVENT\_AGE is too large (such as for type 1 diabetes), has to be accepted for these registers.

![Figure 2](/files/YppgtojTQLrp0DvlWqQi)

Survival analysis can be run using the truncated endpoint file, as in the example below:

**1. With age as the time scale**

`cox<- coxph(Surv(BL_AGE,DEATH_AGE,DEATH)~strata(GENDER) +CANC+INV_HDL+SMOKING+PREVAL_DIAB+factor(BMI_factor),data=foo)`

**2. With follow-up time scale**

DEATH\_AGEDIFF <- DEATH\_AGE-BL\_AGE

`cox<- coxph(Surv(DEATH_AGEDIFF,DEATH)~strata(GENDER)+ BL_AGE+CANC+INV_HDL+SMOKING+PREVAL_DIAB+factor(BMI_factor),data=foo)`
