Time series analysis in epidemiological studies using the R language
Keywords:
Time Series Studies, Ecological Studies, Temporal Distribution, Epidemiological Studies, Statistical modelsAbstract
Objective: To present a script script to use the RStudio software for decomposition of time series in epidemiological studies using the R language. Materials and methods: The data used in this study to demonstrate the applicability of the R environment in the analysis and decomposition of time series were extracted from DATASUS, and composed of data on mortality from infectious diseases in Brazil and in the North Region, considering deaths by residence, from 1996 to 2019. The data were analyzed using the R language through the RStudio software Version 2022.02.1 . Results: Time series were analyzed using the R language and decomposed into their trend, seasonality and noise components. The seasonality graphs were isolated to understand the variation in the behavior of mortality from infectious diseases in the North Region when compared to data from Brazil distributed in the months of the year. Conclusion: Using RStudio, it was possible to analyze and decompose a large volume of data to build a 25-year time series, subdivided into monthly periods. Allowing the customization of graphic elements and their plotting.