Welcome to visit Zhongnan Medical Journal Press Series journal website!

Home Articles Vol 36,2023 No.4 Detail

Implementation of generalized additive models in environmental epidemiology research in Python

Published on May. 06, 2023Total Views: 1199 times Total Downloads: 307 times Download Mobile

Author: Xiang-Ying LI Pei-Zheng LI Jing WANG Chen-Xi LUO Qing-Yu ZHANG Lu MA

Affiliation: School of Public Health, Wuhan University, Wuhan 430071, China

Keywords: Python Generalized additive models Time series data Environmental epidemi-ology

DOI: 10.12173/j.issn.1004-4337.202302032

Reference: Li XY, Li PZ, Wang J, Luo CX, Zhang QY, Ma L. Implementation of generalized additive models in environmental epidemiology research in Python[J]. Journal of Mathematical Medicine, 2023, 36(3): 241-245. DOI: 10.12173/j.issn.1004-4337.202302032[Article in Chinese]

  • Abstract
  • Full-text
  • References
Abstract

Objective To explore the common time series data in the field of environmental ep-idemiology, using Python and other statistical softwares to realize the modeling of generalized additive models (GAM), and to compare the similarities and differences of the modeling process and results of each software.

Method A study of the relationship between PM2.5 and the number of hospital admissions of respiratory diseases was taken as an example. Python software used statsmodles library, R software used mgcv library, SAS software used proc gam syntax to build GAM models, and the differences in codes, parameter settings, and parameter estimates were compared.

Results The modeling logic of 3 programs is similar, but there are differences in the built-in function fitting process, code using and callable spline function. The outputs are basically consistent.

Conclusion Python software can build GAM by using third-party libraries. It provides a reference for further expanding its application in the field of epide-miological scientific research.

Full-text
Please download the PDF version to read the full text: download
References

1.Mckinney W. Data structures for statistical computing in Python[J]. Proc of the 9th Python in science Conf, 2010, 56-61. https://www.researchgate.net/publication/265001241_Data_Structures_for_Statistical_Computing_in_Python.

2.Wood SN. mgcv: GAMs and generalized ridge regression for R. R news, 2001,1(2), 20-25. https://xueshu.baidu.com/usercenter/paper/show?paperid=f73e92306ef7bae5280d10b61de86d8f&site=xueshu_se&hitarticle=1.

3.李莉莉, 张璇, 杜梅慧. 基于广义可加模型的PM2.5预测研究[J]. 数理统计与管理, 2020, 39(5): 811-823. [Li LL,  Zhang X, Du HH. Research on PM2.5 prediction based on generalized additive model[J]. Jouranl of Ap-plied Statistics and Management, 2020, 39(5): 811-823.] DOI: 10.13860/j.cnki.sltj.20200818-005.

4.张云权, 朱耀辉, 李存禄, 等. 广义相加模型在R软件中的实现[J]. 中国卫生统计,  2015, 32(6): 1073-1075. [Zhang YQ, Zhu YH, Li CL, et al. Generalized additional model in R[J]. Chinese Journal of Health Statistics, 2015, 32(6): 1073-1075.] DOI: CNKI:SUN:ZGWT.0.2015-06-053.

5.White LF, Jiang W, Ma Y, et al. Tutorial in Biostatistics: the use of generalized additive models to evaluate alcohol consumption as an exposure variable[J]. Drug Alcohol Depend, 2020, 209: 107944. DOI: 10.1016/j.drugalcdep.2020.107944.

6.Cai W, Inc SI, Cary NC. Fitting generalized additive models with the GAM procedure in SAS 9.2[J]. 1287-1312 World Scientific Review, 2008. DOI: 10.1080/00401706. 1997.10485461.

7.Xiang D. Fitting generalized additive models with the GAM procedure[J]. Sugi Proceedings, 2001, 256-326. https://www.researchgate.net/publication/228390997_Fitting_generalized_additive_models_with_the_GAM_procedure.

8.Wood SN. Stable and efficient multiple smoothing parameter estimation for generalized additive models[J]. Journal of the American Statistical Association, 2004, 99(467): 673-686. DOI: 10.1198/016214504000000980.

Popular papers
Last 6 months