## 4 Methodology
### Predicting and Explaining Changes in the Outcomes  
This study aims to identify interventions related to school improvement in Brazilian public secondary education. We argue that these interventions may be represented by shifts in the values of certain observed variables over time. By examining the statistical relationship between these shifts and changes in school performance over a given period, we can gain insights into the effectiveness of educational policies. Specifically, we are interested in a model that can determine changes in the direct effect of contextual variables \(X,A\), and \(Z\) on changes in outcome \(Y\), while controlling for the unobserved variables \(U\). Following the backdoor criterium and the proposed causal graph, to compute the direct effect of \(X\to Y\), it is necessary to close the indirect path \(X\to A\to Y\), by adjusting for \(A\). This will open a new indirect path \(X\to A\to U^{3}\to[Z,\,U^{2}]\to Y\) due to the collider role of \(U^{3}\), thus making it necessary to adjust at least for \(A\) and \(U^{3}\). To compute the direct effect of \(A\to Y\), it is necessary to close the indirect paths \(A\gets X\to Y,A\to Z\to Y\), and \(A\gets U^{3}\to[Z,\,U^{2}]\to Y\) by adjusting at least for \(X,Z\), and \(U^{3}\). Lastly, to compute the direct effect of \(Z\to Y\), it is necessary to close the indirect paths \(Z\gets U^{2}\to Y,Z\gets A\gets Y,Z\gets A\gets X \to Y\) and \(Z\gets U^{3}\to U^{2}\to Y\) by adjusting for at least for \(A\) and \(U^{2}\). Therefore, a model seeking to compute the effects of \(\{X,Z\,A\}\to Y\) might adjust for all observed variables, as well as the unobservable effects of states (\(U^{3}\)) and schools (\(U^{2}\)). However, since \(U^{2}\) and \(U^{3}\) are unknown, assumptions must be made about them in order to adjust correctly. Assuming they are time-independent and constant over a given time period, it is possible to control for them using a two-way fixed-effects (TWFE) econometric approach. This technique has been established and extensively used to treat unobserved heterogeneity [65; 66], including in some research using LSA data [67; 68]. Under these assumptions, TWFE is a powerful statistical tool for causal inference under observational data due to its ability to control for unobserved and time-invariant confounders [69; 70]. **Assumption 1**. : _The effects of policies on each state and school are invariant and constant over a specific period._  
It is plausible that state policies hold in the medium or long term. The last Brazilian Educational Plan, which is expected to strongly influence state strategies, established its goals for the ten-year period of 2014 to 2024. Additionally, institutional changes occur gradually and evolutionarily rather than radically, particularly in democratic societies [71]. The minimum expected term of office for school principals and Brazilian politicians, which often head the implementation of new policies, is three and four years, respectively. Consequently, the institutional structures of education systems remain relatively similar during the time a student spends in secondary school. **Assumption 2**. : _The structural education models follow a parametric and additive linear function._  
To adjust correctly to the effects of the unobservable effects is necessary to assume a parametric linear distribution of the structural equation. Therefore, they can be straightforwardly modeled as follows:  
\[ \begin{split} y_{jit}-iy-j\underline{y}=\beta_{0}+\beta_{1}\big{(} V_{ijt}-i\underline{\gamma}-j\underline{\gamma}\big{)}+\beta_{1}\big{(}U_{ ijt}-i\underline{\gamma}-j\underline{\gamma}\big{)}+\varepsilon_{ij}\\ \Delta y_{i}=\beta_{0}+\sum_{i=1}^{n}\beta(\Delta V_{i})+\epsilon \end{split}  \tag{1}\]where \(y_{ijt}\) is the average performance for school \(i\) state \(j\), and time \(t\), which are \"de-meaned\" in the first place to the school level and next at the state level \(V\in X,A,Z\) is the set of contextual variables, \(U\) are the unobservables, and \(\varepsilon\) is the random error term.