Cardiff University | Prifysgol Caerdydd ORCA
Online Research @ Cardiff 
WelshClear Cookie - decide language by browser settings

Predicting a diagnosis of ankylosing spondylitis using primary care health records–A machine learning approach

Kennedy, Jonathan, Kennedy, Natasha, Cooksey, Roxanne, Choy, Ernest ORCID:, Siebert, Stefan, Rahman, Muhammad and Brophy, Sinead 2023. Predicting a diagnosis of ankylosing spondylitis using primary care health records–A machine learning approach. PLoS ONE 18 (3) , e0279076. 10.1371/journal.pone.0279076

[thumbnail of pone.0279076.pdf] PDF - Published Version
Available under License Creative Commons Attribution.

Download (1MB)


Ankylosing spondylitis is the second most common cause of inflammatory arthritis. However, a successful diagnosis can take a decade to confirm from symptom onset (via x-rays). The aim of this study was to use machine learning methods to develop a profile of the characteristics of people who are likely to be given a diagnosis of AS in future. The Secure Anonymised Information Linkage databank was used. Patients with ankylosing spondylitis were identified using their routine data and matched with controls who had no record of a diagnosis of ankylosing spondylitis or axial spondyloarthritis. Data was analysed separately for men and women. The model was developed using feature/variable selection and principal component analysis to develop decision trees. The decision tree with the highest average F value was selected and validated with a test dataset. The model for men indicated that lower back pain, uveitis, and NSAID use under age 20 is associated with AS development. The model for women showed an older age of symptom presentation compared to men with back pain and multiple pain relief medications. The models showed good prediction (positive predictive value 70%-80%) in test data but in the general population where prevalence is very low (0.09% of the population in this dataset) the positive predictive value would be very low (0.33%-0.25%). Machine learning can be used to help profile and understand the characteristics of people who will develop AS, and in test datasets with artificially high prevalence, will perform well. However, when applied to a general population with low prevalence rates, such as that in primary care, the positive predictive value for even the best model would be 1.4%. Multiple models may be needed to narrow down the population over time to improve the predictive value and therefore reduce the time to diagnosis of ankylosing spondylitis.

Item Type: Article
Date Type: Published Online
Status: Published
Schools: Medicine
Additional Information: License information from Publisher: LICENSE 1: URL:
Publisher: Public Library of Science
Date of First Compliant Deposit: 3 April 2023
Date of Acceptance: 1 December 2022
Last Modified: 21 May 2023 17:56

Citation Data

Cited 4 times in Scopus. View in Scopus. Powered By Scopus® Data

Actions (repository staff only)

Edit Item Edit Item


Downloads per month over past year

View more statistics