scieee AI-readable full text Open interactive document viewer

Personalised need of care in an ageing society: The making of a prediction tool based on register data

Wright, Marvin N.,Kusumastuti, Sasmita,Mortensen, Laust H.,Westendorp, Rudi G. J.,Gerds, Thomas A.

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Wright, Marvin N.; Kusumastuti, Sasmita; Mortensen, Laust H.; Westendorp, Rudi G. J.; Gerds, Thomas A. Article — Published Version Personalised need of care in an ageing society: The making of a prediction tool based on register data Journal of the Royal Statistical Society: Series A (Statistics in Society) Provided in Cooperation with: John Wiley & Sons Suggested Citation: Wright, Marvin N.; Kusumastuti, Sasmita; Mortensen, Laust H.; Westendorp, Rudi G. J.; Gerds, Thomas A. (2021) : Personalised need of care in an ageing society: The making of a prediction tool based on register data, Journal of the Royal Statistical Society: Series A (Statistics in Society), ISSN 1467-985X, Wiley, Hoboken, NJ, Vol. 184, Iss. 4, pp. 1199-1219, https://doi.org/10.1111/rssa.12644 This Version is available at: https://hdl.handle.net/10419/233751 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by/4.0/ J R Stat Soc Series A. 2021;184:1199–1219. | 1199 wileyonlinelibrary.com/journal/rssa Received: 29 September 2019 | Accepted: 26 November 2019 DOI: 10.1111/rssa.12644 ORIGINAL ARTICLE Personalised need of care in an ageing society: The making of a prediction tool based on register data Marvin N.Wright1 | SasmitaKusumastuti2 | Laust H.Mortensen2,3 | Rudi G. J.Westendorp2 | Thomas A.Gerds4 This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited. © 2021 The Authors. Journal of the Royal Statistical Society: Series A (Statistics in Society) published by John Wiley & Sons Ltd on behalf of Royal Statistical Society 1Leibniz Institute for Prevention Research & Epidemiology–BIPS, Bremen, Germany 2Section of Epidemiology, Department of Public Health, University of Copenhagen, Copenhagen, Denmark 3Section of Methodology and Analysis, Statistics Denmark, Copenhagen, Denmark 4Section of Biostatistics, Department of Public Health, University of Copenhagen, Copenhagen, Denmark Correspondence Marvin N. Wright, Leibniz Institute for Prevention Research & Epidemiology– BIPS, Achterstr. 30, 28359 Bremen, Germany. Email: [email protected] Funding information Novo Nordisk Foundation Challenge Programme, Grant/Award Number: NNF17OC0027812 Abstract Danish municipalities monitor older persons who are at high risk of declining health and would later need home care services. However, there is no established strategy yet on how to accurately identify those who are at high risk. Therefore, there is great potential to optimise the municipalities’ prevention strategies. Denmark’s comprehensive set of electronic population registers provide longitudinal data that cover individual and household socio-demo- graphics and medical history. Using these data, we developed and applied recurrent neural networks to predict the risk of a need of care services in the future and thus identify individuals who would benefit the most from the municipalities’ prevention strategies. We compared our recurrent neural network model to prediction models based on Cox regression and Fine–Gray regression in terms of calibration and discrimination. Challenges for the prediction modelling were the competing risk of death and the longitudinal information on the registered life course data. KEYWORDS competing risks, deep learning, register data, recurrent neural networks, survival analysis 1200 | WRIGHT eTal. 1 | INTRODUCTION Providing optimal and resource-efficient care in an ageing society requires preventive interventions that are targeted towards older persons at high risk of declining health. In Denmark, anyone can ask for home care services from the municipality and the municipality has to ensure that everyone gets care when needed. As of 1 July 2019, Danish municipalities by law must assess the need of home care for all residents who turn 70years old and living alone, or turn 75 and 80 regardless of their living situation. For everyone else between the ages of 65 and 80years, the municipality must monitor which older persons are at high risk of declining health and in need of home care services (Borger.dk, 2019). However, so far there is no established strategy on how to accurately identify these older persons at high risk. The overarching aim of this project is to build an algorithm that can identify older persons who are at high risk of declining health that would require long-term personal home care services. Here, we used a comprehensive set of register data on health and socio-demographics and developed methods to predict the future use of municipal home care services. Eventually, our models will be implemented to provide person-specific information in the form of an online tool to assist municipalities with the information on which older persons are at greater need of a preventive efforts than others. This online tool will help to optimise the municipalities’ preventive strategies for older citizens to delay functional decline and diminish its consequences, allowing individuals to live longer, healthier and independently in old age. In this paper, we developed risk prediction models based on comprehensive longitudinal data. Methods for prediction based on longitudinal data have been investigated for time-to-event analysis (Maziarz etal., 2017; Sweeting & Thompson, 2011, 2012) and machine learning methods have been applied in similar settings as ours (Choi etal., 2017; Zhao etal., 2019). However, the situation where machine learning has to incorporate right censored outcome data and competing risks has not been explored much. As done by Sweeting etal. (2017), we compared two alternative forms of learning from the longitudinal trajectories. In the first, the predictor variables were summaries of the history of a marker derived by a subject matter expert. The expert-derived variables could then be used with standard regression models as well as with machine learning techniques. In the second form, a complex machine learning algorithm was trained directly with the observed longitudinal trajectories. Accounting for the right censored observations of our outcome, we implemented the expertderived predictor variables in standard regression models for competing risks: cause-specific Cox regression (Benichou & Gail, 1990) and Fine–Gray regression (Fine & Gray, 1999). We also adapted artificial neural networks to the competing risk outcome with baseline predictor variables (Lee etal., 2018) and extended recurrent neural networks (Hochreiter & Schmidhuber, 1997) in order to data adaptively derive predictor variables from person specific longitudinal trajectories. Next, we applied the modelling algorithms to register data from the Municipality of Copenhagen and obtained rival prediction models based on the regression and machine learning approaches. We then compared the predictive performance using a temporal validation study. We also investigated to what extent the models built in Copenhagen can be exported to other municipalities in Denmark (spatial validation). Finally, we analysed the relative utility of single data sources by repeating the validation when specific registers were left out of the model. More generally, in this paper we discuss ways to validate and compare traditional regression models with machine learning models for time to event outcomes with competing risks. We illustrate the general steps of design, data analysis and modelling throughout by predicting the need of home care services as a motivating example. We start by discussing the time dynamics of the design and data collection where the object of the analysis is defined relative to a time zero, an event of interest and | 1201 WRIGHT eTal. a time horizon. This is followed by a discussion on the challenges of deriving predictor variables from register data where we distinguish the classical modelling culture, where predictor variables are derived based on expert knowledge, from the machine learning modelling culture, where predictor variables are learnt from the data (Breiman, 2007). 2 | NATION-WIDE REGISTERS There are advantages and disadvantages in using nation-wide registers as a data source for the purpose of developing a prediction model. It is an advantage that they do not exclude individuals in a systematic way. It is also an advantage that the main reason for early end of follow-up, apart from administrative censoring, is moving out of the country. Hence, prediction models built on nation-wide registers are potentially applicable for everyone in the country. However, it is a disadvantage that these electronic records do not necessarily contain specific information for the current purpose. For example, information on physical functioning and lifestyle would be useful for predicting the need of home care. Unfortunately, such data are not available through the registers and can only be roughly approximated based on electronic medical and consumption records. Nonetheless, it is possible that an algorithm can extract specific information by searching through a person’s records across all available registers. The start of a register limits how long back in time we have personal information on a given individual. With increasing age of the register, this limitation gets lessened, but generally the records can only be complete for subjects born after the start of the register. The end of the register also has consequences. For example, to predict the outcome within a 5-year horizon, subjects had to be eligible and registered at least 5 years ago. More generally, the longer the prediction horizon, the older the data. Here we restricted to a 17-year history and also compared to a 10-year history using registers with information on demographics, income, medications, hospitalisation, care services, death and immigration/emigration, see Figure S1 for a timeline overview of these registers. Statistics Denmark is the central authority responsible for maintaining hundreds of high quality Danish registers and producing fine-grained statistics on changes in many aspects of life, for example, social, economic, biomedical conditions and geographical location over time (Frank, 2000). In general there are no missing values in the registers that record services use or consumption. Although these data are largely archived in cross-sectional registers, in 1968 the Danish Civil Registration System established a unique identifier for everyone in the population, making it possible to systematically trace individuals over time and space (Pedersen, 2011). The data used for this project are housed in a protected environment in concordance with national and international guidelines on the use of data for analytical purposes. Identifiable and re-identifiable data can per legal policy not be exported from Statistics Denmark (2017). Here, we used the following registers: The Danish Civil Registration System. All persons alive and living in Denmark are registered by the Danish Civil Registration System, which has existed since 1968 (Schmidt etal., 2014). Here we used information on a person’s age, sex, country of origin, immigration and civil status, family and household types and municipality of residence. The Population Education Register. This register contains information on an individual’s highest completed education ever since 1981, including main education group, type of education and exact title, which corresponds to The International Standard Classification of Education codes. Aalen & Johansen, 1978, there is information for 96.4% of the Danish population aged 15–69 (Jensen & Rasmussen, 2011). This means there are missing information on education for the oldest old, which we categorised as ‘unknown’. 1202 | WRIGHT eTal. The Income Statistics Register. This register provides information for individuals and households regarding the composition of the population’s income and allowance, available and updated annually since 1970 (Baadsgaard & Quitzau, 2011). Here we used information on total salary including self-employed and honorary fees, income from wealth such as stocks and investments, social security allowance from the state such as cash benefits and parental leave, national and early retirement pension, private pension and disposable income. Data are also adjusted according to family situation, that is, number of people registered at the same address. The National Prescription Register. Since 1995, this register has recorded detailed information on prescriptions redeemed by Danish residents at community pharmacies, including drugs prescribed to nursing home residents (Pottegård etal., 2016). Here we used information on the purchase date, the number of packages purchased, the Anatomical Therapeutic Chemical (ATC) classification system codes and the volume of packages. For our analysis, we aggregated the ATC codes to third-level classifications (pharmacological subgroups), for example, from A10BA02 (metformin) to A10B (blood glucose lowering drugs). The National Patient Register. As one of the world’s oldest nationwide hospital registers, it provides detailed administrative and clinical data on all patient contact in Danish non-psychiatric hospitals since 1977 and psychiatric specialty clinics or hospitals since 1995 (Schmidt et al., 2015). Data includes admission date, discharge date, type of patient and primary diagnoses as World Health Organization International Classification of Diseases version 8 (WHO ICD-8) codes (until 1995) and WHO ICD-10 codes (since 1995). In our analysis we aggregated the ICD-10 codes into chapters, for example, from G30.0 (Alzheimer’s disease with early onset) to Chapter 6 (Diseases of the nervous systems). The Older Persons Register on Home Care Visits. This register provides individual-level information on permanent help in the form of care in residents’ own homes. Data includes dates of home care visits and the type and duration of home care services provided, recorded ever since 2008. This includes both personal and practical care. Personal care is defined as assistance given to persons who, due to reduced physical or mental disabilities or special social problems, are not able to perform tasks such as assistance with bathing, toilet visits, coming out of the bed, dressing, medication handling and so forth. Practical care is defined as instrumental assistance such as cleaning, food service, shopping, laundry and so forth. We used the dates and total minutes of combined personal and practical home care per month as one of our outcomes. The Older Persons Register on Nursing Home. This register records detailed individual data on nursing home admittance ever since 2008. Here, we used dates of the first admittance into nursing home as one of our outcomes. The Death Register. Since 1970, this register has been fully digitalised and includes all deaths of Danish residents dying only in Denmark. Ever since 1983, the registers also include deaths among Greenlanders and Faroese living in Denmark and dying in Denmark, Greenland or the Faroe Islands (Helweg-Larsen, 2011). 3 | ANALYSIS DESIGN AND DATA STRUCTURE 3.1 | Analysis design For our application, we considered two alternative analysis designs: the screening design and the cross-sectional design (see Figure 1). In the screening design, all persons receive a predicted risk when they reach a certain age, say 70 years. The calendar dates at which the model is applied depends | 1203 WRIGHT eTal. on the birth year of the persons. The predicted risk can then in principle be updated for individual persons when they get older. In the cross-sectional design, all persons of the population in a given age range, say 65–80 years, receive a predicted risk at a single calendar date, that we call time zero. The prediction can then be repeated frequently, say once a year. Since our aim is to assist the Danish municipalities in optimising preventive strategies and not to design a screening tool, we only pursued and reported from the cross-sectional design. We used longitudinal register data from an exposure window before time zero to predict event probabilities between time zero and the time horizon (see Figure 1). This is different from time-varying covariates observed during the outcome time, as typically analysed in inferential survival analysis (Kalbfleisch & Prentice, 2002). However, our analysis can be seen as a landmark analysis with a single time point (Blanche etal., 2015; Rizopoulos, 2012). Repeated predictions, as explained above, would add new time points to the landmark analysis to update predictions in a dynamic way. 3.2 | Outcome event, competing risks and prediction horizon The target parameter is the probability that the event of interest occurs within a given time horizon since time zero in any subject of the target population. We call this probability the τ-year FIGURE 1 Illustration of the design of the prediction model data analysis. The cross-sectional design predicts the risk of all persons in a given age rage at a single calendar date (time zero). The screening design invites all persons who reach a single age value in a given calendar year to get a predicted risk [Colour figure can be viewed at wileyonlinelibrary.com] Calendar time Age (years) Cross−sectional design Screening design 1967 2004 2014 2015 55 60 65 70 75 80 85 90 95 100 Time zero Time horizon 10−year exposure window Excluded: immigration too late Included: event free Included: event, death or censored 1204 | WRIGHT eTal. risk of the event for a suitably selected time horizon τ. The time horizon is seen from the standpoint of time zero, that is, where the time scale is time since time zero. Thus, we need to define the event of interest and one or several time horizons. In our application, the event of interest is the combined endpoint need of home care or admittance to a nursing home. More formally, let N1(t) be a counting process which at any time t counts the current need of home care in minutes per month. We assume that N1(t) is a monotone increasing process and define a binary outcome variable defined when the home care process exceeds the threshold ξ at any time before the prediction time horizon τ: In what follows we choose τ=1year after the date of time zero as our prediction time horizon and use ξ=60min per month to define the event: need of home care. Letting N2(t) count admittance to a nursing home (0=not in nursing home, 1=in nursing home), we define the binary outcome variable for the combined endpoint as Finally, we need a third counting process N3(t) which takes the value zero while the person is alive and the value one when the person died. The processes N1 and N2 do not change after death and N3 is also used to define the target population. The target population contains only subjects who are theoretically at risk of the event. That is, subjects for whom the event occurred before time zero are excluded. See Figure 2 for a visualisation of this multi-state model. At time zero, all subjects from the target population are in the eligible state. At the time horizon, a person can be in the eligible state (no event), in the Need of home care or admittance to nursing home state (event of interest) or in the Death state (competing event). We do not consider transitions from Need of home care or admittance to nursing home to Death. Other competing risks could be defined if this improves the interpretation of the predicted risks, but it should be noted that this would usually alter the definition of the event of interest. For example, we could define our event of interest as need of home care and consider admittance to a nursing home as a competing risk. Then, the interpretation of the predicted risk would be the probability of need of home care before admittance to a nursing home. Y 1(𝜏,𝜉)= { 0N1(𝜏) <𝜉 1N 1 (𝜏)≥𝜉 . Y(𝜏)=1{(Y1(𝜏,𝜉)+N2(𝜏)) >0}. FIGURE 2 Multi-state model. At time zero, all persons are in the eligible state. At the time horizon, a person can be in either of the three states Eligible at time zero Need of home care or admittance to nursing home Death | 1205 WRIGHT eTal. 3.3 | Predictor variables To describe the structure of the predictor variables in our case study, we let R be the number of data sources from which predictor variables are extracted. A longitudinal or time varying variable is a variable which can change over time. We denote by Xr j(s) the jth variable extracted from the rth register evaluated at time s≤0 where 0 is time zero defined above. Longitudinal variables are evaluated at the cross-section with time zero and this current status value, Xr j(0) , can be used for prediction. In addition to the current status value at time zero, there may be predictive value in the changes of the process Xr j(s) over time. Thus, for longitudinal variables we fix a length of the exposure time window w and consider as predictors the trajectories in the w-year history of each person: Note that, in principle, one can use different exposure time windows for different variables and that the start of the register r is a natural upper limit for the value w (see Section 3.4). We use the notation X ={X r j,w ;j ≤ Jr,r ≤ R } to describe all observed trajectories across all registers in the considered exposure time window. A derived predictor variable Zk is any variable which arises from applying a function fk to the (wyear) history of the other variables (across the registers), that is, We consider k=1,…,K derived predictor variables, where K is an integer which may in fact be larger than the total number of observed variables, ∑R r=1 J r . A simple example of a derived variable is when rare categories of a categorical variables are merged somehow. For example, we can collapse the country of origin into a new derived variable which has only two classes: {Denmark} and {Rest of the world}. A more complex example would be the number of hospital admissions in the w-year history which triggered at least one new drug purchase within 8 weeks after the discharge from hospital. Derived variables can either be specified by a priori expert knowledge (classical statistical approach) or learnt from the data in a supervised fashion (machine learning approach). 3.4 | Censored observation In our case study, we have to deal with different censoring patterns before and after time zero. To describe the censoring patterns before time zero, note that the register-specific processes are leftcensored at the start of the register. This means for example that we can see that a patient purchases anti-diabetic medicine but the onset of diabetes, that is, the date of the first purchase is unknown (left-censored). We deal with this by limiting the length of the exposure time window w to be short enough such that the registered history of all contributing persons is equally long. Furthermore, persons are excluded from our analysis (and from being eligible for using our prediction model) if they immigrated into Denmark so late that they do not have the full exposure time window recorded in the Danish registers (see Figure 1). Persons are also excluded if they emigrated out of Denmark at any time point during the exposure time window, even if the immigrated into Denmark again before time zero. This is in order to be able to calculate the full w-year histories Xr j,w . After time zero, we right censor the outcome processes for persons when they emigrate out of Denmark before the prediction time horizon. Xr j,w ={X r j (s):w ≤ s ≤ 0} . Z k=fk(X r j,w :r=1, …,R;j=1, …,Jr ). 1206 | WRIGHT eTal. Let C be the right censoring time, and T the time to need of home care, nursing home or death, whatever comes first. The observed event time is  T=min (T,C) and the event variable and censoring indicator are Δ=DI{C≥min(T)} where D=1 if either need of home care or nursing home occurs and D=2 if death occurs without need of home care or nursing home. The observation is right censored when Δ=0 and in this case neither T nor D are observed. The observed data set Dn =(X i ,Z i ,  T i ,Δ i ) n i=1 consists of data from n individual persons who are eligible according to the exposure time window w and alive (without event) at time zero. 4 | MODELLING In the competing risk setting (Figure 2), the standard survival analysis provides several alternative regression modelling strategies (see e.g. Gerds etal., 2012). Here, we focus on the most popular ones, that is, the cause-specific Cox regression and the Fine–Gray regression. Furthermore, we apply artificial neural networks for competing risks (Lee etal., 2018) and combine these networks with recurrent neural networks (Hochreiter & Schmidhuber, 1997) to learn from longitudinal data. In line with the classical modelling culture, we fit the two regression methods to derived predictor variables Z and, in line with the machine learning modelling culture, the two neural network methods to untransformed predictor variables X. In the following, we denote by M a prediction model, and by  M( Z new,𝜏) and  M( X new,𝜏) the predicted τ-year risks for predictor variables of a new individual Znew and Xnew , respectively. 4.1 | Cause-specific Cox regression Our first candidate prediction model combines several Cox regression models into a predicted risk of the outcome (Benichou & Gail, 1990; Ozenne etal., 2017). Specifically, we use a multiple Cox regression for the hazard rate of need of home care or nursing home: where Z=(Z1,…,ZK) are the derived variables, 𝜆01 is an unspecified baseline hazard rate and 𝛽=𝛽1,…,𝛽K a vector of log-hazard ratios. Similarly, we specify another multiple Cox regression for the hazard rate of death Based on these two models we predict the probability of the outcome event for a new person’s-based derived predictor values Znew with the formula: 4.2 | Fine–Gray regression The Fine–Gray regression model (Fine & Gray, 1999) provides an alternative, more direct way of modelling the absolute risk of the outcome: 𝜆1 (t | Z)=𝜆 01 (t)e{𝛽 T Z } 𝜆2 (t | Z)=𝜆 02 (t)e{𝛾 T Z }  M CSC (Znew,𝜏)= 𝜏 ∫ 0 exp ⎧ ⎪ ⎨ ⎪ ⎩ − t ∫ 0�𝜆1(u�Znew)+𝜆2(u�Znew)�du ⎫ ⎪ ⎬ ⎪ ⎭ 𝜆1(t�Znew)dt . | 1213 WRIGHT eTal. FIGURE 7 Results of the temporal validation (left) and spatial validation (right), showing IPA (top), AUC (centre) and calibration (bottom) of the benchmark model, cause-specific Cox model (CSC), artificial neural network (ANN) and recurrent neural network using 10 years of personal history (RNN-w10) [Colour figure can be viewed at wileyonlinelibrary.com] Model Benchmark CSC ANN RNN−w10 0.0 2.5 5.0 7.5 10.0 36912 Months since time zero IPA (%) 0.0 2.5 5.0 7.5 10.0 36 91 2 Months since time zero IPA (%) 70 75 80 85 90 95 36912 Months since time zero AUC (%) 70 75 80 85 90 95 36 91 2 Months since time zero AUC (%) 0 25 50 75 100 0255075100 Predicted 1−year risk (%) Estimated actual risk (%) 0 25 50 75 100 0255075 100 Predicted 1−year risk (%) Estimated actual risk (%) 1214 | WRIGHT eTal. The importance of medications and hospital admissions decreased over time, while the importance of income increased. 6 | DISCUSSION Using Danish register data, we improved neural networks for competing risks (Lee etal., 2018) by combining them with RNNs to predict the risk of needing long time care services (home care or FIGURE 8 Validation of RNN (10-year window, trained in Municipality of Copenhagen) in the rest of Denmark [Colour figure can be viewed at wileyonlinelibrary.com] Aarhus ● ● Copenhagen ● ● −5 0 5 10 15 IPA (%) FIGURE 9 Results of the temporal validation when single data sources were left out. For the CSC, Demographics consists of the variables age and house type, Income of disposable income quantiles, Medications of the number of prescribed medications and Hospital of the number of hospital diagnoses. For the RNN, these correspond to the whole registers [Colour figure can be viewed at wileyonlinelibrary.com] CSC RNN−w10 246810 12 246810 12 0.0 2.5 5.0 7.5 10.0 Follow−up time (months) AUC (%) difference to full model Register Demographics Income Medications Hospital | 1215 WRIGHT eTal. nursing home) in the future with death as competing risk and thus identify older individuals who are at high risk of declining health. We then assessed its performance by comparing our improved RNN with other established models. Temporal validation indicates the CSC outperformed the benchmark model as much as it was outperformed by the non-recurrent neural network (ANN), which in turn was outperformed by our RNN using a 10-year time history window. While the spatial validation from Copenhagen to Aarhus municipality showed promising results, comparisons across the whole country indicated that in some municipalities with very low observed risk, a very simple model that predicted the same risk to every individual, outperformed our improved RNN. This indicates that these municipalities are structurally different from the other municipalities in Denmark. In terms of relative utility of single data sources, CSC heavily relied on demographics, while the RNN assigned higher importance to medications and hospital admissions. Remarkably, the importance of health information decreased over time, whereas the importance of income increased. The outcome of interest that we have modelled was either receiving home care for at least 1 hour per month or admittance to a nursing home, whichever comes first, with death as competing risk. From a care provider standpoint, if a person dies earlier than expected, it can be seen as a saving, as a long-term care trajectory is prevented (Taniguchi etal., 2018). Therefore, in terms of prediction, the classification as a negative is correct as there is no use of long-term care. Although correlated, the distinction of these outcomes is of vital interest to correctly predict long-term care services provisions. Moreover, prevention of care services dependency necessitates a different intervention than prevention of mortality (Connolly etal., 2016). When longevity would be the primary interest, a screening model would be more appropriate, whereas mortality would be the primary outcome instead of a competing risk. From a care provider’s perspective, there is further complexity as older persons transition between care services, that is, there is a vast heterogeneity in care trajectories with different services and intensity (Colmorten etal., 2004). For example, some may require long term yet simple instrumental help, for example, food delivery, without ever needing the more resource-heavy personal medical care, while some may not need care at all until they are nearing death (Taniguchi etal., 2018). Therefore, the next logical step would be to analyse and predict the various types of care trajectories and what kind of predictors distinguish the one from the other. This is particularly relevant for municipalities since they have to target-specific high risk groups and prioritise which kind of services they should allocate their resources into. This new way of using data to shape health care strategies introduces new ways of understanding and approaching health and disease (Beam & Kohane, 2018). Furthermore, it also reveals an unforeseen opportunity to compare practice performances, for example, the various preventive programmes the municipalities have to offer. Here, we found considerable differences between the municipalities in the risk of receiving home care or admittance to nursing home. This could be due to differences in health status between the citizens, the social cohesion of people in the community helping each other when in need, how the municipalities organise care or how need of care is reported by the different care providers (Kjaer & Siren, 2019). Whereas most of these differences in the need of care should be picked up by our modelling, the latter results into differences in data quality among the municipalities and may hamper validation and extrapolation of the prediction model. This kind of insight instigates further attention to differences in reporting as these register data were not recorded with the purposes of predicting need of health care services (Schmidt etal., 2019). It should be emphasised that correctly identifying older persons at risk of long-term care services is just the first step. The obvious next step is to optimise the municipalities’ interventions to keep older persons independent and prevent dependency on care services. This is a pertinent goal for most older persons as well as the service provider. The effectiveness of better tailoring the presumed effective interventions however can only be studied using clinical trials (Moons etal., 2012). Note that the 1216 | WRIGHT eTal. moment these tailored interventions become effective in delaying functional decline and consequently need of health care services, the outcome of the prediction model changes as well, which necessitates continued updating, calibrations and validations of the prediction tool (Lenert etal., 2019). While these prediction tools hold the promise of optimising preventive interventions in daily practice, ethical concerns with regards to privacy, confidentiality and control have arisen (Price & Cohen, 2019). Since Statistics Denmark operates under the Danish law with the overarching principle to protect the identity of the persons, the use of register data necessitates that privacy and confidentiality are guaranteed (Statistics Denmark, 2017). Effectively, the modelling that we reported here could be performed within this legal and regulatory framework, however the future implementation of this prediction tool requires further ethical considerations (Char etal., 2018). The principal hurdle to overcome is that the municipality as the responsible care provider is not allowed to run an analytic algorithm on an individual’s register data to determine risk without explicit consent from the individual itself. Therefore, this risk estimation should be included as an option when offering care services and only used given the individual’s consent. With regards to control, a valid prediction tool can only serve as an advisory to help the municipality to target their prevention strategies but not to make decision on prevention or care service delivery (Ngiam & Khor, 2019). Decision making involves respect for citizens’ autonomy and consent. Using the prediction tool, the municipality can make a better offering of their preventive interventions and it is up to the individual to decide on whether or not they would accept. Arguably, this is the best way to utilise machine learning methods, at the very beginning as a preliminary assessment, taking into account a plethora of possibilities and providing evidence that would otherwise have not been obtainable given limited time and resources (Schwalbe & Wahl, 2020). The unique combined strength of the present work lies in developing novel methods capable of handling the complexity of large, pre-existing longitudinal nationwide register data to pre-emptively help older persons maintain their functions thereby alleviating the burden of a societal problem. The novel use of our modelling exercise improved the predictive accuracy and calibration, which provided the municipalities with a tool to optimise their prevention strategies. Although there is traditionally a great emphasis on the predictive values of physical health in use of health care services, the use of care is apparently dependent on socio-demographic characteristics, some of which are readily available in the registers with significant information load. It needs to be explored which of these could ideally be detailed to improve the tool’s prediction performance. Although register data are considered as highly valued resource for research, still it is important to understand that its purpose of gathering data is administrative and not for scientific endeavours and or practical applications (Schmidt etal., 2019). Consequently, there may be biases, for example, potential misclassification due to residents in need of help and care was offered by the municipality, but the residents simply rejected the offer (Rostgaard, 2011). Even though such cases are not the norm, nonetheless this means that our outcome could be more appropriately referred as ‘use of care’ and not ‘need of care’. Furthermore, it is a limitation that we did not include primary care data, for example, from general practitioners or physiotherapists as predictors in this study. Currently, these data are only available in a very coarse format as the number of contacts to the physician without a diagnosis code or treatment procedure. As a result, these variables did not pick up any signal in addition to hospital, medication and care data. In conclusion, taking advantage of the high-dimensionality of Danish population registers, we created further value out of available data by developing a machine learning tool to address a societal problem due to population ageing. We found that our method is capable to accurately predict the use of care services with favourable performance when compared to other established methods, though there were limitations in some regions. Although results so far have been promising, further methodological explorations and ethical considerations leading to clinical experiments are essential to implement the tool. | 1217 WRIGHT eTal. ACKNOWLEDGEMENTS This research was supported by grants from the Novo Nordisk Foundation Challenge Programme: Harnessing the Power of Big Data to Address the Societal Challenge of Aging [NNF17OC0027812]. REFERENCES Aalen, O.O. & Johansen, S. (1978) An empirical transition matrix for non-homogeneous Markov chains based on censored observations. Scandinavian Journal of Statistics, 5, 141–150. Baadsgaard, M. & Quitzau, J. (2011) Danish registers on personal income and transfer payments. Scandinavian Journal of Public Health, 39, 103–105. Beam, A.L. & Kohane, I.S. (2018) Big data and machine learning in health care. Journal of American Medical Association, 319, 1317–1318. Benichou, J. & Gail, M.H. (1990) Estimates of absolute cause-specific risk in cohort studies. Biometrics, 46, 813–826. Biganzoli, E., Boracchi, P., Mariani, L. & Marubini, E. (1998) Feed forward neural networks for the analysis of censored survival data: A partial logistic regression approach. Statistics in Medicine, 17, 1169–1186. Biganzoli, E.M., Boracchi, P., Ambrogi, F. & Marubini, E. (2006) Artificial neural network for the joint modelling of discrete cause-specific hazards. Artificial Intelligence in Medicine, 37, 119–130. Blanche, P., Dartigues, J.-F. & Jacqmin-Gadda, H. (2013) Estimating and comparing time-dependent areas under receiver operating characteristic curves for censored event times with competing risks. Statistics in Medicine, 32, 5381–5397. Blanche, P., Proust-Lima, C., Loubère, L., Berr, C., Dartigues, J.-F. & Jacqmin-Gadda, H. (2015) Quantifying and comparing dynamic predictive accuracy of joint models for longitudinal marker and time-to-event in presence of censoring and competing risks. Biometrics, 71, 102–113. Borger.dk (2019) Forebyggende hjemmebesøg. Available from: https://www.borger.dk/aeldr e/hjemm ehjaelp-og-aeldre- pleje/forebyggende-hjemmebesoeg. Accessed 2019-11-18. Breiman, L. (2007) Statistical modeling: The two cultures. Statistical Science, 16, 199–215. Char, D., Shah, N. & Magnus, D. (2018) Implementing machine learning in health care—addressing ethical challenges. Massachusetts Medical Society, 378, 981–983. Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H. etal. (2014) Learning phrase representations using RNN encoder-decoder for statistical machine translation. Preprint arXiv:1406.1078. Available from: http://arxiv.org/abs/1406.1078. Choi, E., Schuetz, A., Stewart, W.F. & Sun, J. (2017) Using recurrent neural network models for early detection of heart failure onset. Journal of the American Medical Informatics Association, 24, 361–370. Collins, G.S., Reitsma, J.B., Altman, D.G. & Moons, K.G.M. (2015) Transparent reporting of a multivariable prediction model for individual prognosis or diagnosis (TRIPOD): The TRIPOD statement. BMJ, 350, g7594. Colmorten, E., Clausen, T. & Bengtsson, S. (2004) Providing integrated health and social care for older persons in Denmark. In: Leichsenring, K. & Alaszewski, A.M. (Eds.) Providing integrated health and social care for older persons: A European overview of issues at stake. London: Routledge, pp. 139–179. Connolly, D., Garvey, J. & McKee, G. (2016) Factors associated with adl/iadl disability in community dwelling older adults in the Irish longitudinal study on ageing (TILDA). Disability and Rehabilitation, 39, 809–816. Faraggi, D. & Simon, R. (1995) A neural network model for survival data. Statistics in Medicine, 14, 73–82. Fine, J. & Gray, R.J. (1999) A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94, 496–509. Frank, L. (2000) When an entire country is a cohort. Science, 287, 2398–2399. Gensheimer, M.F. & Narasimhan, B. (2018) A scalable discrete-time survival model for neural networks. PeerJ, 7, e6257. Gerds, T.A. & Schumacher, M. (2006) Consistent estimation of the expected Brier score in general survival models with right-censored event times. Biometrical Journal, 48, 1029–1040. Gerds, T.A., Scheike, T.H. & Andersen, P.K. (2012) Absolute risk regression for competing risks: Interpretation, link functions, and prediction. Statistics in Medicine, 31, 3921–3930. Gerds, T.A., Andersen, P.K. & Kattan, M.W. (2014) Calibration plots for risk prediction models in the presence of competing risks. Statistics in Medicine, 33, 3191–3203. Helweg-Larsen, K. (2011) The Danish register of causes of death. Scandinavian Journal of Public Health, 39, 26–29. 1218 | WRIGHT eTal. Hochreiter, S. & Schmidhuber, J. (1997) Long short-term memory. Neural Computation, 9, 1735–1780. Hochreiter, S., Bengio, Y., Frasconi, P. & Schmidhuber, J. (2001) Gradient flow in recurrent nets: The difficulty of learning long-term dependencies. In: Kolen, J.F. & Kremer, S.C. (Eds.) A field guide to dynamical recurrent neural networks. New York: Wiley-IEEE Press. Jensen, V.M. & Rasmussen, A.W. (2011) Danish education registers. Scandinavian Journal of Public Health, 39, 91–94. Jeong, J.-H. & Fine, J. (2006) Direct parametric inference for the cumulative incidence function. Journal of the Royal Statistical Society: Series C (Applied Statistics), 55, 187–200. Kalbfleisch, J.D. & Prentice, R.L. (2002) The statistical analysis of failure time data, 2 edn. Hoboken, NJ: John Wiley & Sons. Kattan, M.W. & Gerds, T.A. (2018) The index of prediction accuracy: An intuitive measure useful for evaluating risk prediction models. Diagnostic and Prognostic Research, 2, 7. Katzman, J.L., Shaham, U., Cloninger, A., Bates, J., Jiang, T. & Kluger, Y. (2018) DeepSurv: Personalized treatment recommender system using a Cox proportional hazards deep neural network. BMC Medical Research Methodology, 18, 24. Kjaer, A.A. & Siren, A. (2019) Formal and informal care: Trajectories of home care use among Danish older adults. Ageing & Society, 40, 1–24. Lee, C., Zame, W. & Yoon, J. (2018) Deephit: A deep learning approach to survival analysis with competing risks. In: AAAI conference on artificial intelligence. New Orleans, USA. Lenert, M.C., Matheny, M.E. & Walsh, C.G. (2019) Prognostic models will be victims of their own success, unless... Journal of the American Medical Informatics Association, 26, 1645–1650. Maziarz, M., Heagerty, P., Cai, T. & Zheng, Y. (2017) On longitudinal prediction with time-to-event outcome: Comparison of modeling options. Biometrics, 73, 83–93. Moons, K., Kengne, A., Grobbee, D., Royston, P., Vergouwe, Y., Altman, D.G. etal. (2012) Risk prediction models: II. External validation, model updating, and impact assessment. BMJ Heart, 98, 691–698. Ngiam, K.Y. & Khor, I.W. (2019) Big data and machine learning algorithms for health-care delivery. The Lancet Oncology, 20, e262–e273. Ozenne, B., Sørensen, A.L., Scheike, T., Torp-Pedersen, C. & Gerds, T.A. (2017) riskRegression: Predicting the risk of an event using Cox regression models. R Journal, 9, 440–460. Pedersen, C.B. (2011) The Danish civil registration system. Scandinavian Journal of Public Health, 39, 22–25. Pottegård, A., Schmidt, S.A.J., Wallach-Kildemoes, H., Sørensen, H.T., Hallas, J. & Schmidt, M. (2016) Data resource profile: The Danish national prescription registry. International Journal of Epidemiology, 46, 798–798f. Price, W. & Cohen, I. (2019) Privacy in the age of medical big data. Nature Medicine, 25, 37–43. Rizopoulos, D. (2012) Joint models for longitudinal and time-to-event data: With applications in R. Boca Raton: CRC Press. Rostgaard, T. (2011) Care as you like it: The construction of a consumer approach in home care in Denmark. Nordic Journal of Social Research, 2, 54–69.Available from: https://doi.org/10.7577/njsr.2042. Schmidt, M., Pedersen, L. & Sørensen, H.T. (2014) The Danish civil registration system as a tool in epidemiology. European Journal of Epidemiology, 29, 541–549. Schmidt, M., Schmidt, S.A.J., Sandegaard, J.L., Ehrenstein, V., Pedersen, L. & Sørensen, H.T. (2015) The Danish national patient registry: A review of content, data quality, and research potential. Clinical Epidemiology, 7, 449–490. Schmidt, M., Schmidt, S.A.J., Adelborg, K., Sundbøll, J., Laugesen, K., Ehrenstein, V. etal. (2019) The Danish health care system and epidemiological research: From health care contacts to database records. Clinical Epidemiology, 11, 563–591. Schwalbe, N. & Wahl, B. (2020) Artificial intelligence and the future of global health. The Lancet, 395, 1579–1586. Statistics Denmark. (2017) Data confidentiality. Available from: https://www.dst.dk/en/OmDS/lovgivning. Accessed 2019-11-18. Sweeting, M.J. & Thompson, S.G. (2011) Joint modelling of longitudinal and time-to-event data with application to predicting abdominal aortic aneurysm growth and rupture. Biometrical Journal, 53, 750–763. Sweeting, M. & Thompson, S. (2012) Making predictions from complex longitudinal data, with application to planning monitoring intervals in a national screening programme. Journal of the Royal Statistical Society: Series A (Statistics in Society), 175, 569–586. Sweeting, M.J., Barrett, J.K., Thompson, S.G. & Wood, A.M. (2017) The use of repeated blood pressure measures for cardiovascular risk prediction: A comparison of statistical models in the ARIC study. Statistics in Medicine, 36, 4514–4528. | 1219 WRIGHT eTal. Taniguchi, Y., Kitamura, A., Nofuji, Y., Ishizaki, T., Seino, S., Yokoyama, Y. etal. (2018) Association of trajectories of higher-level functional capacity with mortality and medical and long-term care costs among community-dwelling older Japanese. The Journals of Gerontology: Series A, 74, 211–218. Zhao, J., Feng, Q., Wu, P., Lupu, R.A., Wilke, R.A., Wells, Q.S. etal. (2019) Learning from longitudinal data in electronic health record and genetic data to improve cardiovascular event prediction. Scientific Reports, 9, 1–10. SUPPORTING INFORMATION Additional supporting information may be found online in the Supporting Information section. How to cite this article: Wright MN, Kusumastuti S, Mortensen LH, Westendorp RG, Gerds TA. Personalised need of care in an ageing society: The making of a prediction tool based on register data. J R Stat Soc Series A. 2021;184:1199–1219. https://doi.org/10.1111/rssa.12644