Using machine learning to investigate self-medication purchasing in England via high street retailer loyalty card data
Alec Davies; Mark A. Green; Alex D. Singleton (2018). PLOS ONE, 13(11), e0207523. DOI: 10.1371/journal.pone.0207523
Abstract
The availability alongside growing awareness of medicine has led to increased self-treatment of minor ailments. Self-medication is where one ‘self’ diagnoses and prescribes over the counter medicines for treatment. The self-care movement has important policy implications, perceived to relieve the National Health Service (NHS) burden, increasing patient subsistence and freeing resources for more serious ailments. However, there has been little research exploring how self-medication behaviours vary between population groups due to a lack of available data. The aim of our study is to evaluate how high street retailer loyalty card data can help inform our understanding of how individuals self-medicate in England. Transaction level loyalty card data was acquired from a national high street retailer for England for 2012–2014. We calculated the proportion of loyalty card customers (n ~ 10 million) within Lower Super Output Areas who purchased the following medicines: ‘coughs and colds’, ‘Hayfever’, ‘pain relief’ and ‘sun preps’. Machine learning was used to explore how 50 sociodemographic and health accessibility features were associated towards explaining purchasing of each product group. Random Forests are used as a baseline and Gradient Boosting as our final model. Our results showed that pain relief was the most common medicine purchased. There was little difference in purchasing behaviours by sex other than for sun preps. The gradient boosting models demonstrated that socioeconomic status of areas, as well as air pollution, were important predictors of each medicine. Our study adds to the self-medication literature through demonstrating the usefulness of loyalty card records for producing insights about how self-medication varies at the national level. Big data offer novel insights that add to and address issues that traditional studies are unable to consider. New forms of data through data linkage may offer opportunities to improve current public health decision making surrounding at risk population groups within self-medication behaviours.
Extended Summary
This research investigates how high street retailer loyalty card data can inform understanding of self-medication purchasing patterns across England. The study addresses a significant gap in public health research by analysing objective purchasing behaviour rather than relying on traditional self-reported data, which can suffer from bias and limited geographical coverage. Using transaction-level loyalty card data from a national retailer covering approximately 10 million customers between 2012-2014, the research employed machine learning techniques to explore sociodemographic and environmental factors influencing the purchase of four medicine categories: coughs and colds treatments, hayfever medications, pain relief products, and sun protection preparations. The study aggregated customer data to Lower Super Output Areas and applied both Random Forests and Extreme Gradient Boosting (XGBoost) models to analyse how 50 different sociodemographic and health accessibility variables predicted purchasing patterns. The analysis revealed that pain relief medications were the most commonly purchased self-medication products, with median proportions above 55% in Local Authority Districts. Coughs and colds treatments also showed high purchasing rates, reflecting their prevalence as common minor ailments. Sun protection products exhibited the lowest purchase rates and demonstrated the only significant gender difference, with females purchasing these products at nearly twice the rate of males. Geographically, the research identified a clear North-South divide in purchasing patterns, with London and South-East regions showing consistently higher proportions of self-medication purchases across most product categories. This distribution aligned with known socioeconomic patterns, with more affluent areas demonstrating higher rates of over-the-counter medicine purchasing. The machine learning models demonstrated that socioeconomic status, measured through the Index of Multiple Deprivation, was consistently the most important predictor across all medicine types, showing a negative association with purchasing behaviour. Air quality variables, particularly particulate matter (PM10) and nitrogen dioxide (NO2), emerged as significant positive predictors for respiratory-related medications, suggesting environmental factors influence self-medication decisions. Age appeared as an important factor specifically for sun protection purchases, with younger customers more likely to buy these products. The research demonstrates the potential of big data approaches in public health surveillance and policy development. Unlike traditional health surveys limited by sample sizes and geographical scope, loyalty card data provides national-scale insights into actual consumer behaviour. This methodology offers opportunities for geographic targeting of public health interventions and could inform NHS resource allocation by identifying areas with high self-medication usage. The findings have important implications for health policy, particularly regarding the promotion of self-care to reduce NHS burden whilst ensuring appropriate access to treatments across different socioeconomic groups.
Key Findings
- Pain relief medications were the most commonly purchased self-medication products, with median purchasing proportions above 55% in Local Authority Districts.
- Clear North-South geographical divide exists in self-medication purchasing, with London and South-East regions showing consistently higher purchase rates.
- Socioeconomic status was the strongest predictor of purchasing behaviour, with more deprived areas showing significantly lower self-medication rates.
- Air pollution levels, particularly PM10 and nitrogen dioxide, positively predicted purchases of respiratory-related medications like coughs, colds and hayfever treatments.
- Females purchased sun protection products at nearly twice the rate of males, representing the only significant gender difference across medicine categories.
Citation
@article{davies2018using,
author = {Alec Davies; Mark A. Green; Alex D. Singleton},
title = {Using machine learning to investigate self-medication purchasing in England via high street retailer loyalty card data},
journal = {PLOS ONE},
year = {2018},
volume = {13(11)},
pages = {e0207523},
doi = {10.1371/journal.pone.0207523}
}