OCCUPATION AND HEALTH ›› 2026, Vol. 42 ›› Issue (19): 2708-2712.

• Investigation and Research • Previous Articles     Next Articles

Comparative study of Logistic regression and random forest models on factors influencing myopia in primary and secondary school students

JIN Lina1, XIA Zhiwei2, HUANG Na1, WANG Lu2, WEI Yiyun1(), CHENG Ruocheng1()   

  1. 1 Beijing Haidian District Center for Disease Control and PreventionBeijing 100094, China
    2 Beijing Center for Disease Control and PreventionBeijing 100013, China
  • Received:2026-03-11 Revised:2026-03-27 Online:2026-10-01 Published:2026-08-17
  • Contact: WEI Yiyun,E-mail:vanilla_xy@126.com;CHENG Ruocheng,E-mail:tom-andy@163.com

Abstract:

Objective To identify and compare factors associated with myopia among primary and secondary school students by means of multivariable Logistic regression and random forest analysis,so as to provide multidimensional scientific evidence for myopia prevention and control. Methods From 2019 to 2024,a stratified cluster sampling method was employed to recruit 10 666 students from Grade 4(primary) to Grade 12(senior high) in a district of Beijing City for visual acuity examinations and standardized questionnaires. After univariate screening,multivariable Logistic regression was used to detect risk factors for myopia. A random forest model was constructed to rank the importance of predictors,and variables retained at the point of minimum out-of-bag(OOB) error were regarded as key factors. Results Univariate analysis of 22 myopia-related factors revealed statistically significant differences in the detection rates of screening myopia across 17 factors,including gender,educational stage,classroom seat rotation,whether daily eye exercises ≥2 times or not,whether excessive homework duration,distance between chest and desk,distance between eyes and books,distance between fingers and pen tip,parental reminders regarding reading and writing posture,daily television viewing time,daily computer usage time,daily mobile electronic device usage time,reading or viewing electronic screens while lying or prone,reading or viewing electronic screens while walking or riding in vehicles,daytime outdoor activity duration,sleep status,and parental myopia status(all P<0.05). The results of Logistic regression analysis showed that higher educational stage(junior high OR=3.973,95%CI:3.519-4.484;senior high OR=6.028,95%CI:5.299-6.858),parental myopia(OR=2.561, 95%CI:2.318-2.830),female sex(OR=1.710,95%CI:1.554-1.882),frequent/constant parental reminders on reading-writing posture(OR=1.373,95%CI:1.232-1.530),excessive homework duration(OR=1.190,95%CI:1.080-1.312),and staying in the classroom during breaks(OR=1.164,95%CI:1.041-1.303) were significant risk factors for myopia. In the random forest model,the lowest OOB error was achieved with five variables,the area under the curve(AUC) of the receiver operating characteristic curve(ROC curve) was 0.702, and the top five predictors were educational stage,parental myopia,excessive homework duration,parental reminders on posture,and teacher reminders on posture. Conclusion The Logistic regression model identifies six risk factors,while the random forest model identifies five important factors. Both models consistently identify educational stage,parental myopia,excessive homework duration,and parental reminders on reading-writing posture as the most prominent risk factors for myopia. Cross-validation between the two analytical approaches provides robust scientific evidence for myopia prevention and control strategies.

Key words: Random forest model, Students, Myopia, Risk factors, Multifactorial

CLC Number: