Abstract
Construction of hierarchical models in applied contexts. Hierarchical linear models have become a very popular tool for analyzing data with a hierarchical structure. This methodology recognizes the nested structure of the data and allows obtaining unbiased estimates of the variations found in the different levels of the hierarchy. The goal of this article is to illustrate the construction of hierarchical models both in cross-sectional and longitudinal contexts involving three and four levels, respectively. The efficiency of an intervention program designed to improve the mathematical performance of primary school students is evaluated to illustrate the statistical modelling process. The example used is analyzed by the SAS and SPSS packages, whose syntax is duly detailed in the manuscript.