Analysis of Factors Associated with Large Kidney Stones: Stone Composition, Comorbid Conditions, and 24-H Urine Parameters—a Machine Learning-Aided Approach

  • Zhaoyi ChenEmail author
  • Mattia Prosperi
  • Vincent G. Bird
  • Victoria Y. Bird
Part of the following topical collections:
  1. Topical Collection on Medicine


We aim to describe factors that are associated with kidney stones 20 mm or larger. This information would potentially guide research regarding factors of kidney stone growth. We retrospectively reviewed a patient cohort who underwent surgical treatment for kidney stones. Patients with detailed demographics, 24-h urine testing, and kidney stone profiling were included. Large stone was defined as measuring 20 mm or more. Univariate analysis was conducted to assess variables associated with kidney stones larger than 20 mm. Multivariate logistic regression and statistical machine learning methods were used to infer prediction models. The specific composition of kidney stones, laboratory testing results, and detailed demographics of 277 patients were included in our analysis. Multiple variables were significantly associated with large stones in univariate analysis. The final model that predicts large stone size includes several variables from different domains: hypertension (OR = 1.91; 95% CI 1.06, 3.43), older age (60+ vs 20–40) (OR = 2.46; 95% CI 1.07, 5.63), decreased calcium oxalate supersaturation (OR = 0.92; 95% CI 0.85, 0.99), and higher percentage of protein in stone composition (OR = 5.64; 95% CI 2.04, 15.58). This model yields a sensitivity 83% and specificity of 56%. Models using machine learning algorithms identified similar predictors, but the performance varies. Our model yielded good performance, and it could potentially be used as a clinical tool for predicting large stones and identifying factors affecting kidney stone growth. Similar analysis in other cohorts should be pursued to externally validate findings.


Kidney stone Stone size Prediction Machine learning 


Kidney stone prevalence is increasing in the U.S. population and it causes a significant financial burden for its diagnosis and treatment [1, 2]. There is a correlation between stone size and surgical treatment of choice. Kidney stones that are less than 6 mm in diameter usually pass spontaneously with success rates of up to 90% within 30 days, but the chance of spontaneous passage is significantly reduced as the size of stone increases [3]. Large stones over 20 mm are often treated with percutaneous nephrolithotomy (PCNL). This invasive treatment is at a large cost to patients and healthcare system due to its relatively more invasive nature, anesthesia, operation time, associated pain, recovery time, and possible complications [4]. In addition to increasing complexity in removing the stones, larger stones also pose higher risk of adverse renal conditions. As cumulative stone size increases, glomerular filtration rate significantly decreases, and risk of chronic kidney diseases increases [5]. Large stones over 20 mm may be associated with obstruction of urine flow, pain, and other urinary tract problems including infection and renal failure [6].

Factors associated with larger stone size or stone growth have not been well elucidated. Previous studies reported that urine or serum uric acid concentration is positively associated with stone growth, and larger stones were more frequently observed in the lower-pole of the kidney in comparison to upper-pole or mid kidney locations [7]. Another study showed that patients with no or mild hydronephrosis were less likely to have larger kidney stones than those with moderate or severe hydronephrosis [8].

The identification of patient populations who present with large stones and detailed study of stone composition, demographics, and laboratory values may provide understanding of the complex pathophysiology of kidney stones. In this study, we aim to characterize a population with large stones, explore predictors of large stones, and develop a predictive model for large kidney stones by combining patients’ information domains on demographics, 24-h urine testing, comorbidities, and kidney stone profiling. The findings from our study may be particularly useful in clinical decision making for patients with other medical comorbidities that increase their risk for intervention, or patients of advanced age who may have decreased physical function and poor tolerance for anesthesia and related surgical interventions for treatment of urinary lithiasis.

Materials and Methods

After obtaining Institutional Review Board approval, we retrospectively reviewed all medical records from a consecutive patient cohort who underwent surgeries from 2010 to 2015 for treatment of their kidney stones. Patients with complete detailed demographic, clinical, and serum laboratory analyses and two 24-h urine testing information were included in our study. We maintained strict inclusion criteria to allow for a more rigorous characterization of those individuals presenting with large stones.


The outcome variable was a large stone size. A 20-mm threshold was selected based on findings from the literature, as patients who have stones larger than 20 mm usually need more invasive stone removal treatment, and the optimal surgical procedures for stones larger than 20 mm are usually different from the procedures for smaller stones [9, 10]. Patients were divided into two groups based on their stone size: those who had stones larger than selected cutoff point (> 20 mm) were considered the “large stone group,” while those with stones smaller than the selected cutoff point were classified the “small stone group.” Due to a relatively small sample size, we did not subclassify stones smaller than 10 mm as a separate category.


Demographic characteristics such as patients’ age, gender, race, and insurance status were included. Clinical information including patients’ body mass index (BMI), American Society of Anesthesiologists Score (ASA score), prior history of kidney stones, and other medical comorbidities were collected. Laterality of stone, locations within the kidney, and composition of kidney stones were also included. The specific stone compositions included calcium oxalate monohydrate (COM), calcium oxalate dihydrate (COD), calcium phosphate (CaP) hydroxyl form and carbonate form, ammonium magnesium phosphate (struvite), calcium dihydrogen phosphate, other calcium types, protein, uric acid, and magnesium ammonium phosphate. For our analysis, we combined struvite and carbonated calcium phosphate as infectious kidney stones. In addition, we included urine parameters from two consecutive 24-h urine analysis results; specific parameters included pH, urine volume, citrate, uric acid, supersaturation calcium oxalate (CaOx), supersaturation CaP, supersaturation uric acid, creatinine, calcium, oxalate, protein catabolic rate, concentration of sodium, potassium, magnesium, phosphorus, ammonium, chloride, sulfite, and urea nitrogen. The two 24-h urines were used in aggregate for the analysis.

Statistical Analysis

Descriptive analysis was conducted to assess associations between demographic characteristics, clinical variables, and urine parameters and stone size. The p values from univariate analysis were adjusted using Bonferroni correction. Logistic regression with stepwise selection was then conducted using variables selected in univariate analysis. We also endeavored to infer a prediction model by fitting several machine learning techniques on the full variable set in addition to stepwise logistic regression. Specifically, (i) a decision tree by means of the C4.5 algorithms [11]; (ii) a LogitBoost algorithm in conjunction with logistic regression [12]; (iii) a random forest (optimizing number of trees up to 1000) [13]; and (iv) a super learner stacking all the above methods [14].

The performance of the models was assessed using sensitivity, specificity, and area under the receiver operating characteristic (AUROC) [15]. Model comparison, evaluation, and selection were carried out using a 10-fold cross-validation framework, and performance indices were compared using Bengio and Nadeau’s correction to Student’s t test [16]. The optimal sensitivity/specificity cutoff was calculated using the Youden’s J statistic [17]. All statistical analyses were conducted using SAS v9.4 (SAS Institute Inc., Cary, NC, USA) and Weka v3.9 [18].

Data Availability

Data for this analysis are available upon request and approval from institutional review board.


A total of 277 patients were included in our analysis. Among all patients, 116 (41.9%) of them had a stone size ≥ 20 mm, while the remaining 161 (58.1%) patients had a stone size less than 20 mm.

A total of 31 comorbidities (occurred in at least 5% of all patients) and a total of 22 urine laboratory variables were included in our analysis. In addition, a total of 10 different compounds were found in stone samples from all patients including COM, COD, CaP hydroxyl form, CaP carbonate form, calcium dihydrogen phosphate, other calcium types, protein, uric acid, magnesium ammonium phosphate, and ammonium acid urate (struvite).

In univariate analysis (Table 1), we found multiple variables that were significantly different (p < 0.05) between large and small KS. Supersaturation and concentration of several parameters was uniformly lower in the large KS cohort, including citrate, overall urine supersaturation, calcium, and creatinine. Stone compositions consisting of uric acid and infectious stones were significantly higher in the larger stone group, and the amount of protein in the overall composition of the stone was also higher in the larger stone group. The smaller kidney stones were associated with COD stone composition. As for clinical variables, obesity and age over 60 were higher in the larger KS cohort; history of hypertension (65.5% vs 39.1%), diabetes (29.3% vs 18.6%), and malignant bowel obstruction (15.5% vs 7.5%) were also significantly higher in the larger KS cohort. In analysis of urine parameters, patients with large stones had lower values of CaOx supersaturation (6.7 vs 8.2) and CaP supersaturation (0.9 vs 1.4), lower citrate levels (453.6 vs 568.4), creatinine per kilogram (16.7 vs 18.1), and calcium per kilogram (2.15 vs 2.5). There was no significant difference in other urine parameters. As for stone composition, larger kidney stone group had higher percentages of carbonate apatite and struvite stone (7.3% vs 2.8%), uric acid (16.4% vs 5.3), and protein (2.7% vs 2.2%), but lower percentage of COD (11.4% vs 18.1%); all other stone compositions were not significantly different between the two groups.
Table 1

Univariate analysis of all demographic variables and comorbidities, urine parameters, and stone compositions that are significantly differently distributed in large stone group vs small stone group at p < 0.1 level



p value

Large stone

Small stone

116 (41.9%)

161 (58.1%)


  Gender (male)

66 (56.9%)

88 (54.7%)



  African American

13 (11.2%)

12 (7.5%)



96 (82.8%)

141 (87.6%)


7 (6.0%)

6 (3.7%)


0 (0%)

2 (1.2%)

Age group


12 (10.3%)

38 (23.6%)



33 (28.5%)

61 (37.9%)


71 (61.2%)

62 (38.5%)

BMI category


56 (48.3%)

98 (60.9%)



60 (51.7%)

63 (39.1%)


Stone history


35 (30.2%)

64 (39.8%)


  1–3 times

50 (43.1%)

71 (44.1%)


  More than 3 times

31 (26.7%)

26 (16.2%)


ASA score


3 (2.6%)

14 (8.7%)



112 (96.6%)

145 (90.1%)



1 (0.9%)

2 (1.2%)



  Hypertension (yes)

76 (65.5%)

63 (39.1%)

< 0.0001

  Diabetes (yes)

34 (29.3%)

30 (18.6%)


  Malignant bowel obstruction (yes)

18 (15.5%)

12 (7.5%)


Urine analysis

Mean (IQR)


  Supersaturation CaOx

6.7 (4.1, 8.8)

8.2 (5.1, 10.7)



453.6 (174.3, 621.3)

568.4 (281.0, 716.4)


  Supersaturation CaP

0.9 (0.2, 1.5)

1.4 (0.5, 2.0)



16.7 (13.3, 20.0)

18.1 (14.4, 21.3)



2.15 (1.0, 3.0)

2.5 (1.5, 3.2)


Stone compositions (%)

  Calcium oxalate dehydrate (COD)

11.4 (0, 16.5)

18.1 (0, 30.0)


  Infectious stones

7.3 (0, 6.0)

2.8 (0, 0.5)


  Uric acid

16.4 (0, 0)

5.3 (0, 0)



2.7 (2.0, 3.0)

2.2 (2.0, 3.0)

< 0.0001

Using logistic regression with stepwise selection, we were able to infer a simple model for prediction of large stones with only 4 variables (Table 2): hypertension (OR = 1.91; 95% CI 1.06, 3.43), older age (60+ vs 20–40) (OR = 2.46; 95% CI 1.07, 5.63), calcium oxalate supersaturation (OR = 0.92; 95% CI 0.85, 0.99), and log-transformed protein percentage (OR = 5.64; 95% CI 2.04, 15.58). This model yielded a 74% AUROC under 10-fold cross-validation with 0.80 sensitivity and 0.56 specificity. In addition, a multi-nominal logistic regression was used to examine factors associated with large stones when compared with mid-sized stones (10–20 mm), as these factors may represent stones that are growing. Older age (60+ vs 20–40) (OR = 3.74; 95% CI 1.36, 10.6), obese (OR = 2.64; 95% CI 1.22, 5.70), and log-transformed protein percentage (OR = 5.51; 95% CI 1.31, 23.12) were positively associated with large stones, while calcium oxalate supersaturation (OR = 0.88; 95% CI 0.80, 0.98) was negatively associated with large stones. Due to the limited sample size in this group, we did not explore this comparison further using other statistical methods.
Table 2

Multivariate stepwise logistic regression demonstrates independent significant parameters that are highly specific to large kidney stones: demographics, 24-h urine, and kidney stone composition


OR (95% CI)

p value


  1 vs 0

1.91 (1.06, 3.43)


  Supersaturation CaOx

0.92 (0.85, 0.99)


Age group

  40–60 vs 20–40

1.21 (0.50, 2.91)


  60+ vs 20–40

2.46 (1.07, 5.63)


  Protein (log-transformed)

5.64 (2.04, 15.58)


Using the same 10-fold cross-validation settings, machine learning techniques did not yield a substantial increase in performance indices. In fact, the stepwise logistic regression outperformed all machine learning models we applied. The comparisons of their performance and AUROC curve are shown in Table 3.
Table 3

Performance in predictivity of machine learning models demonstrates logistic regression as the most important analytical tool for large kidney stone-associated parameter analysis







p value*

Logistic regression

0.74 (0.03)






Super learner

0.69 (0.03)





< 0.0001

Random forest

0.64 (0.03)





< 0.0001


0.63 (0.03)





< 0.0001

Decision tree

0.61 (0.03)





< 0.0001

The data in bold indicate the final model of choice.

*t test results comparing AUROC in each of the machine learning models vs stepwise logistic regression; p value indicates that the logistic regression outperforms other models in AUROC


The prevalence of kidney stone has been increased in the last four decades. It incurs substantial healthcare cost and patient-related morbidity [1, 2], especially for those with large stones. Efforts for prevention of urinary stone disease are critical to improving patient quality of life and healthcare costs. Part of prevention involves identification of factors that may be relates to a larger sized kidney stone. Identification of subpopulations of patients at risk for development of large stones is therefore an integral part of this process, more so in that large stones may be associated with substantial costs and attendant morbidities. In this study, we examined the performances of several prediction models for large stones using a large number of features with machine learning-aided approach; we also identified several factors that may contribute to large stone sizes.

Overall, the models we built were not good enough to predict large stones alone, the best (and final) model of choice was logistic regression with stepwise selection, which yielded an AUROC of 0.74, and at the optimal cut point, a sensitivity of 0.83 and a specificity of 0.56. This model gives a relatively good sensitivity but low specificity, which there are few false negatives but more false-positive results. The machine learning models did not have better performance due to small sample size and limited amounts of features included in our analysis, but the most important variables identified through different models were consistent, suggesting these variables are potentially associated with large stone sizes.

The final model is a simple multivariate logistic model containing variables that were selected through greedy stepwise selection; patients with hypertension, higher value of protein in urine, lower value of supersaturation CaOx, and higher age were associated with higher risks of large stones. Older age may be related to several comorbidities associated with larger stones and may contribute to a number of patients with asymptomatic kidney stones which were observed. Hypertension was showed to be highly prevalent in patients with nephrolithiasis in a previous study [2]. Physiologically, hypertension may increase the urinary excretion of calcium oxalate and phosphate and decrease the production of functional crystallization inhibitors, subsequently leading to oxidative stress and higher risk of kidney stones [19]. Higher protein concentration in urine was also associated with an elevated risk of large stones; we found higher and significant levels of protein concentration in the larger kidney stone group. Previous studies have suggested that large kidney stones have micro-CT-visible void regions possibly representing areas with protein composition within the stone structure [20], which could explain the observed high concentration of protein in our study. The composition of large stones is somewhat variable from literature, and it is worthwhile to consider this heterogeneity; it is notable that there were less calcium oxalate stones in the large stone cohort than in the small stone cohort. In the smaller stone group, the composition of calcium oxalate stones was 64%, which is consistent with previous reports of calcium oxalate stones being the most common in small stones [21]. On the other hand, in our large kidney stone group, the proportion of calcium oxalate was about 30%, and our final model showed that a large stone is associated with less supersaturation for calcium oxalate. It has been demonstrated that in more advanced kidney disease, there is less filtrate of solutes in the glomerulus, thus less supersaturation of elements. A recent study in patients with spontaneously passed stones showed the presence of calcium oxalate stone was associated with smaller maximal stone diameter (MSD) and stone volume (SV) compared with other stone types; this evidence combined with our findings suggested that calcium oxalate is potentially associated with slower stone growth [22].

There are limitations in the present study. First, we included patients who underwent surgeries to remove their stones and not patients who passed small stones; this may further separate groups with a more defined difference among kidney stone composition, clinical diagnosis, and 24-h urine parameters between small and large kidney stone size formers. Second, we analyzed a sample from a single site; the sample size is relatively small, more so for the machine learning models, and there may be a selection bias for which we did not adjust. Third, the longitudinal effects of time were not included in our study, and it is possible that the size of a stone is correlated with the length of that that it has been growing. However, the growth phase of a stone is usually asymptomatic, so it is not possible to collect and use the time of growth prospectively.

Despite these limitations, the differences we have noted in our study may be used as targets of studies to elucidate pathophysiology of different types of kidney stone formation, and for further studies and for future intervention and prevention. The prediction model from our analysis showed good sensitivity, meaning that it can distinguish patients with larger stones very well; however, it did not yield adequate specificity which limits the use of this predictive model. When combined with the performance from machine learning models, it indicates that the variables included in this study may not be sufficient to predict stone sizes and suggests that the etiology of kidney stone formation and growth is complex in nature warranting further studies. However, these findings may still play important role in future studies that aim to associate large kidney stones with several patient-related parameters.

In conclusion, using a data-driven approach, we provided a simple statistical model for prediction of large stones with only four variables. This model yielded moderate sensitivity and somewhat limited specificity, we also provided valuable insights in understanding the nature of larger kidney stone risk factors. These may help in future efforts to identify factors associated with large kidney stones. Follow-up analysis on a larger scale is needed to improve sensitivity and specificity of the model and validate our findings.


Authors’ Contribution

Chen: Protocol/project development, data analysis, manuscript writing/editing

Prosperi: Data analysis, manuscript writing/editing

Bird (Vincent): Data collection or management, manuscript writing/editing

Bird (Victoria): Protocol/project development, data collection or management, manuscript writing/editing

Compliance with Ethical Standards

Conflict of Interest

The authors declare that they have no conflict of interest.

Ethical Approval

This article does not contain any studies with human participants or animals performed by any of the authors. The analysis was a retrospective analysis, and the study was approved by the University of Florida Institutional Review Board as exempt.


  1. 1.
    Chen Z, Prosperi M, Bird VY. Prevalence of kidney stones in the USA: the National Health and Nutrition Evaluation Survey. J Clin Urol. 2018:205141581881382.
  2. 2.
    Scales CD, Smith AC, Hanley JM, et al. Prevalence of kidney stones in the United States. Eur Urol. 2012;62:160–5. Scholar
  3. 3.
    Pearle MS, Goldfarb DS, Assimos DG, et al (2014) AUA guidelines medical management of kidney stones: AUA guideline.
  4. 4.
    Kyriazis I, Panagopoulos V, Kallidonis P, Özsoy M, Vasilas M, Liatsikos E. Complications in percutaneous nephrolithotomy. World J Urol. 2014;33:1069–77. Scholar
  5. 5.
    Ahmadi F, Etemadi SM, Lessan-Pezeshki M, Mahdavi-Mazdeh M, Ayati M, Mir A, et al. Contribution of stone size to chronic kidney disease in kidney stone formers. Int J Urol. 2015;22:104–8. Scholar
  6. 6.
    Gettman MT, Segura JW. Management of ureteric stones: issues and controversies. BJU Int. 2005;95(Suppl 2):85–93. Scholar
  7. 7.
    Burgher A, Beman M, Holtzman JL, Monga M. Progression of nephrolithiasis: long-term outcomes with observation of asymptomatic calculi. J Endourol. 2004;18:534–9. Scholar
  8. 8.
    Goertz JK, Lotterman S. Can the degree of hydronephrosis on ultrasound predict kidney stone size? Am J Emerg Med. 2010;28:813–6. Scholar
  9. 9.
    Assimos D, Krambeck A, Miller NL, Monga M, Murad MH, Nelson CP, et al. Surgical management of stones: American Urological Association/Endourological Society Guideline, PART I. J Urol. 2016;196:1153–60. Scholar
  10. 10.
    Cohen J, Cohen S, Grasso M. Ureteropyeloscopic treatment of large, complex intrarenal and proximal ureteral calculi. BJU Int. 2013;111:E127–31. Scholar
  11. 11.
    Quinlan JR (1992) C4.5: programs for machine learning.Google Scholar
  12. 12.
    Friedman J, Hastie T, Tibshirani R. Additive logistic regression: a statistical view of boosting. Ann Stat. 2000;28:337–407.CrossRefGoogle Scholar
  13. 13.
    Breiman L. Random forests. Mach Learn. 2001;45:5–32. Scholar
  14. 14.
    van der Laan MJ, Polley EC, Hubbard AE. Super learner. Stat Appl Genet Mol Biol. 2007;6.
  15. 15.
    Fawcett T. An introduction to ROC analysis. Pattern Recogn Lett. 2006;27:861–74. Scholar
  16. 16.
    Nadeau C, Bengio Y. Inference for the generalization error. Mach Learn. 2003;52:239–81. Scholar
  17. 17.
    Schisterman EF, Perkins NJ, Liu A, Bondell H. Optimal cut-point and its corresponding Youden index to discriminate individuals using pooled blood samples. Epidemiology. 2005;16:73–81. Scholar
  18. 18.
    Frank E, Hall MA, Witten IH (2016) The WEKA workbench.Google Scholar
  19. 19.
    Bird VY, Khan SR. How do stones form? Is unification of theories on stone formation possible? Arch Esp Urol. 2017;70:12–27.Google Scholar
  20. 20.
    Pramanik R, Asplin JR, Jackson ME, Williams JC. Protein content of human apatite and brushite kidney stones: significant correlation with morphologic measures. Urol Res. 2008;36:251–8. Scholar
  21. 21.
    Finkielstein VA, Goldfarb DS. Strategies for preventing calcium oxalate stones. CMAJ. 2006;174:1407–9.CrossRefGoogle Scholar
  22. 22.
    Keller EX, De Coninck V, Audouin M, et al. Stone composition independently predicts stone size in 18,029 spontaneously passed stones. World J Urol. 2019.

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Epidemiology, College of Public Health and Health Professions & College of MedicineUniversity of FloridaGainesvilleUSA
  2. 2.Department of Urology, College of MedicineUniversity of FloridaGainesvilleUSA

Personalised recommendations