In the different fields of science, many times, there is a need to estimate the associations between variables, as an approach to understanding the interaction of one as a function of the others. It is usually done by applying restrictive models, such as analysis of variance and linear regression. This type of analysis requires that the dependent variable be continuous, have a normal and constant distribution of the mean and variance. However, when the dependent variable is discrete or categorical, the linear model is not viable. Faced with this impediment, the theory of linear models arises and is expanded to broader categories, which have been called Generalized Linear Models. This category assumes that all distribution functions are exponential, in which the normal distribution is located. In this sense, in this research, Generalized Least Squares methods were applied in their various variants: of moments, ordinary and feasible. These models allow calculating the parameters of models in which the dependent variable has a Poisson or multinomial distribution. In such a way that the Generalized Least Squares serve as a tool to analyze the effect of the elections on public spending and its relationship with the electoral results, analyzing the variables of a budgetary nature, derived from the possibility that the government in power continues or is re-elected. For this, data related to the states and municipalities of México in the period 2007 to 2019 are used.