Implementation of generalized additive models in environmental epidemiology research in Python

Xiang-Ying LI,Pei-Zheng LI,Jing WANG,Chen-Xi LUO,Qing-Yu ZHANG,Lu MA
DOI: https://doi.org/10.12173/j.issn.1004-4337.202302032
2023-01-01
Abstract:Objective To explore the common time series data in the field of environmental epidemiology, 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 PM 2.5 and the number of hospital admissions of respiratory diseases was taken as an example. Python so?tware used statsmodles library, R so?tware 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 3programs 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 so?tware can build GAM by using third-party libraries. It provides a reference for further expanding its application in the field of epidemiological scientific research.
What problem does this paper attempt to address?