{'fraction_non_alphanumeric': 0.032805573147561745, 'fraction_numerical': 0.03065231158961368, 'mean_word_length': 4.717595944967415, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Life expectancy and risk of death in 6791 communities in England from 2002 to 2019: high-resolution spatiotemporal analysis of civil registration data

Summary Background High-resolution data for how mortality and longevity have changed in England, UK are scarce. We aimed to estimate trends from 2002 to 2019 in life expectancy and probabilities of death at different ages for all 6791 middle-layer super output areas (MSOAs) in England. Methods We performed a high-resolution spatiotemporal analysis of civil registration data from the UK Small Area Health Statistics Unit research database using de-identified data for all deaths in England from 2002 to 2019, with information on age, sex, and MSOA of residence, and population counts by age, sex, and MSOA. We used a Bayesian hierarchical model to obtain estimates of age-specific death rates by sharing information across age groups, MSOAs, and years. We used life table methods to calculate life expectancy at birth and probabilities of death in different ages by sex and MSOA. Findings In 2002–06 and 2006–10, all but a few (0–1%) MSOAs had a life expectancy increase for female and male sexes. In 2010–14, female life expectancy decreased in 351 (5·2%) of 6791 MSOAs. By 2014–19, the number of MSOAs with declining life expectancy was 1270 (18·7%) for women and 784 (11·5%) for men. The life expectancy increase from 2002 to 2019 was smaller in MSOAs where life expectancy had been lower in 2002 (mostly northern urban MSOAs), and larger in MSOAs where life expectancy had been higher in 2002 (mostly MSOAs in and around London). As a result of these trends, the gap between the first and 99th percentiles of MSOA life expectancy for women increased from 10·7 years (95% credible interval 10·4–10·9) in 2002 to reach 14·2 years (13·9–14·5) in 2019, and for men increased from 11·5 years (11·3–11·7) in 2002 to 13·6 years (13·4–13·9) in 2019. Interpretation In the decade before the COVID-19 pandemic, life expectancy declined in increasing numbers of communities in England. To ensure that this trend does not continue or worsen, there is a need for pro-equity economic and social policies, and greater investment in public health and health care throughout the entire country. Funding Wellcome Trust, Imperial College London, Medical Research Council, Health Data Research UK, and National Institutes of Health Research.


Areas
As specified in the main paper, data for the poverty, unemployment and low education indicators were taken from the English Indices of Deprivation. 1  However, the definition of the indicators can change over time. Further, the indicator used for measuring education, skills and training deprivation (low education) is not directly interpretable because it combines multiple concepts cannot be simply expressed as a proportion of the population. Therefore, we used ranking so that comparisons can be made not only across MSOAs in a single year, but also across the two years shown in Figure 4 of the main paper.
The 2004 data on deprivation domains were reported for LSOA boundaries from the 2001 census. We mapped these data to the 2011 census LSOA boundaries, which was the reporting unit for the 2019 data, as follows: First, for deprivation, we assigned the 2001 LSOA score to all postcodes contained within it. We then overlayed the 2011 LSOA boundaries, and averaged the score for all constituent postcodes of each LSOA, to obtain the corresponding score for each 2011 LSOA. The MSOA-level scores were created by taking the population-weighted average of scores for all constituent LSOAs, as has been done previously for local authority districts. 3 These were then ranked to obtain the MSOA ranking.
2 Appendix Text 2: Specification of the Bayesian statistical model As described in the main paper, we used a Bayesian hierarchical model to obtain robust estimates of death rates by age group, MSOA (spatial unit) and year, which were then used to calculate life expectancy. The model was run separately for each sex. The model was formulated to incorporate important features of death rates in relation to age, space and time.

The parameter is
where (≥ 0) is the overdispersion parameter, which accounts for extra variability not captured by other components in the model, and is the death rate. The negative binomial likelihood can be thought of as a generalisation of a Poisson likelihood, which allows for overdispersion, with larger values of indicating more similarity to a Poisson distribution.
Log-transformed death rates were modelled as a function of time, age group and MSOA. The model contains terms to capture the overall level and rate of change of mortality, as well as age-specific and MSOA-specific terms to allow deviations from these terms. Specifically, logtransformed death rates are modelled as where α 0 is the overall intercept across all age groups and MSOAs. β 0 quantifies the overall trend (over time) across all age groups and MSOAs. α 1 and β 1 measure deviation from the overall intercept and trend terms, respectively, for each MSOA. α 2 and β 2 measure deviation from the global level and trend, respectively, for each age group. We used first-order random walk priors on α 2 and β 2 so that they vary smoothly over adjacent age groups, with the form ∼ � −1 , A 2 � for both age-specific terms α 2 and β 2 . We constrained 21 = 0 and β 21 = 0 so each random walk was identifiable and centred on the corresponding overall term.
ξ is an age group-MSOA interaction term, which quantifies MSOA-specific deviations from the overall age group structure given by α 2 . This allows different MSOAs to have different age-specific mortality patterns, and each age group's death rate to have a different spatial pattern. This interaction term was modelled as �0, σ ξ 2 �.
ν and γ are first-order random walks over time that allow MSOA-and age group-specific non-linearity in the time trends. For each MSOA and age group, they were modelled via similar priors to those above with ν 1 = γ 1 = 0 so that the terms were identifiable.
Appendix Table 1 shows all model parameters, their priors and dimensions.

Spatial structures
For the main analysis, the MSOA intercepts and slopes, 1 and 1 , were modelled as nested hierarchical random effects, with MSOAs nested in districts, which were, in turn, nested in regions. The regional terms are centred on zero to allow the spatial effects to be identifiable.
For comparison, we also modelled the spatial effects using a Besag, York and Mollie (BYM) model. 4 The BYM setup models the spatial effects as the sum of spatially-structured random effects with conditional autoregressive (CAR) priors, allowing information to be shared locally between neighbouring MSOAs, and spatially-unstructured (independent and identically distributed, IID) random effects, allowing information to be shared amongst all MSOAs. The

Hyperpriors
As in earlier analyses, weakly informative priors were used so that inference on the parameters was driven by the data. 5,6 All variance parameters of the random effects had σ ∼ (0,2) priors.
For the global intercept and slope, we used (0, σ 2 = 100000). We used these diffuse priors for the global intercept and slope as there is ample information in the data to estimate both parameters. Other diffuse priors, such as a uniform distribution defined on a wide interval, for example from -1000 to 1000, would yield near identical estimates. The overdispersion parameter had the prior (0,50).

Implementation
Inference was performed using Markov chain Monte Carlo in NIMBLE. 7,8 Where possible, centred parameterisations were used in the model coding in order to reduce autocorrelation in the chains. We monitored convergence using trace plots and the R-hat diagnostic, 9    Subscripts are as follows: s -MSOA; d -district; r -region; a -age group.

Parameter name Symbol Female Male
Regional intercept standard