Predictors of Secondary Education Completion across Portuguese Municipalities: Evidence from the 2009–2018 Period

: Our overriding goal was to understand territorial inequalities regarding secondary school completion by testing which contextual factors and educational resources are associated with their change in high-and low-density Portuguese municipalities. Our analysis covered the time between 2009 and 2018, including both the economic crisis and the economic recovery period. Drawing mostly on publicly available data from 253 municipalities and following a Linear Mixed Model approach, we found that low-density municipalities depicted significantly greater levels of secondary school attainment by 2013 compared to high-density municipalities. Moreover, growing unemployment rates were associated with a reduction in secondary school completion rates across the assessed time points. Contrary to our expectations, higher rates of permanent teachers were associated with worse rates of secondary school completion. In addition, we found a significant increase in the rates of secondary school conclusion at higher levels of preschool enrollment among high-density municipalities. Our discussion counteracts the usual overstating of vulnerable territories’ worse educational indicators. We also underline the importance of improving secondary education indicators for reducing structural inequalities in the school-to-work transition in less affluent territories and pinpoint the importance of implementing policies, such as improving access to preschool education in Portuguese high-density municipalities.


Introduction
For the past decade, Portuguese educational policies have contributed to boosting secondary school attainment and thus preventing early school leaving from education and training [1]. A more nuanced understanding of this change requires research efforts aiming at uncovering the territorial patterns of secondary school achievement and its predictors. School achievement spatialities constitute, however, a marginal, though necessary trend in the international literature [2]. This is especially true considering that students tend to perform worse in low-density areas such as inland, outermost, or mountain regions. These areas are mostly rural, more isolated, less affluent, and sparsely populated [3]. Students' lower achievement in low-density regions is associated with the shortage of adequate human resources [4], inadequate infrastructures [5], or a cultural mismatch between communities and schools [6]. Some suburban areas on the outskirts of major metropolitan centers, for instance, also show lower educational outcomes [7]. School outcomes in these high-density areas are affected by other specific factors, such as the disregard for cultural diversity in curricular programs [7,8].
Our research aims to understand territorial inequalities regarding secondary school attainment. We specifically tested which relevant contextual factors (e.g., poverty) and educational resources (e.g., permanent teachers' rate) at the municipal level were associated with the change in secondary school completion between 2009 and 2018 across high-and low-density Portuguese municipalities. We focused on the 2009-2018 period because it covers two distinct socioeconomic moments during the implementation of the Europe 2020 strategy: the 2008-2013 economic crisis, as well as the 2014-2018 recovery period. We also established a contrast between high-and low-density municipalities by following a composite classification of municipal territories based on population density, settlement, geographic, socioeconomic, and accessibility criteria issued by the Inter-ministerial Coordination Commission [9] and adopted by the Portuguese Association of Municipalities.
Our work has implications at the national and local levels. At the national level, secondary school attainment in Portugal has improved dramatically [10]. Rates of early school leaving from education and training came down from 30.9% in 2009 to 10.6% in 2019. In 2022, this indicator had dropped even more to 5.9% [11]. Moreover, the share of young people aged 15-24 years who completed ISCED levels 3-4 (secondary and postsecondary school) increased from 30.4% in 2009 to 42.6% in 2019 [12]. While the significant improvements in secondary education attainment cut across Portuguese urban, suburban, and rural territories [10], a more nuanced understanding of this trend according to spatial criteria is still missing. This is particularly relevant in Portugal due to significant contrasts between coastal areas, which concentrate most of the population and resources, and inland areas and islands, which are less affluent territories [13,14]. Moreover, Portugal is among the EU countries projected to experience a 21-27% population decline until 2050, with a higher loss (−20%) in seven regions located inland, mostly in rural border regions [15]. These territorial and demographic inequalities shape the distribution of resources within the Portuguese education system. Both the infrastructure and curricular offers are more limited in less affluent territories, leading students enrolled in secondary education to commute from low-density municipalities to nearby municipalities daily [15,16]. Moreover, the asymmetrical distributions of population and resources have deep impacts on the school-to-work transition, further increasing the gaps between more and less affluent Portuguese territories. For instance, the higher rates of young people Not in Employment, Education, or Training (NEET) across Portuguese regions tend to be concentrated in less affluent Southern and outermost areas of the country [17].
At the local level, Portuguese authorities correspond to a network of municipalities composed of elected representatives responsible for the satisfaction of the population's needs within a given council's territory [18]. Since 2018, Portugal has been going through a complex process of decentralization of educational competencies, meaning a transference of these competencies from the central State to municipalities, covering issues such as budget, human resources, or equipment and infrastructure management [19]. The adoption of education-related competencies by municipalities is not mandatory, meaning that local decision makers may or may not replace the central State in managing educational policies. This decentralization of education is likely to increase variability in resource allocation and student experiences and outcomes across municipalities, strengthening the need to examine the predictors of student attainment at the regional/municipal levels.

Educational Public Policies in Portugal: A Snapshot
Since 1974, after nearly 40 years of dictatorship, Portugal took significant steps to ensure universal access to education. In 1986, a new Basic Law on the Education System [20] was approved. This law stipulated mandatory education until 15 years of age and aimed at a general education common to all Portuguese citizens, implying an unspecialized, general, and universal basic education [21]. In the following years, this overarching legal framework underwent some changes. Among the most relevant are Law no. 85/2009 [22], which established the extension of mandatory education up to 12 years of studies/18 years of age and the universality of preschool education for children from 5 years of age. Later, Decree Law no. 176/2012 [23] defined a framework for preventing school failure and dropout. Following the above-mentioned legislative initiatives, Portugal has shown a favorable change in its main educational indicators. The number of secondary school students increased continuously between 2009/2010 and 2013/2014, the peak year for the time range considered in our study, before gradually decreasing until 2018/2019, also due to demographic factors (e.g., lower birth rates) [10]. Moreover, between 2009/2010 and 2018/2019, the net secondary school enrollment evolved positively, with overall dropout rates decreasing across the country and its regions [24].
The Ministry of Education regulates the education system in Portugal from preschool up until secondary school. Schools are often organized in clusters (agrupamentos escolares), aggregating educational settings from preschool or primary school levels to lower or upper secondary school levels from the same municipality under the same administration. This means that one municipality might have one or more school clusters depending on its size and population. These school clusters also work closely with local municipalities to obtain funding and partially define the curriculum. Secondary school is overall divided into two main streams. The first one is organized as general secondary education comprising four different courses (sciences and technologies, arts, economy and humanities) and enables students to complete secondary education and to apply for tertiary education. The second stream is Vocational Education and Training (VET), aiming at students pursuing a professional diploma by the end of secondary school. However, VET students may apply to polytechnical courses as well as to universities. In the case of the latter, these students must, however, take additional exams [24].

Educational Attainment across Low-and High-Density Territories
Academic results differ between low-and high-density territories in various countries, regardless of educational level [3,25,26]. In secondary education, this trend is particularly visible in dropout rates, with low-density territories performing worse [3], including in Portugal [1]. Some overarching justifications have been put forward to explain these disparities. Schools in low-density territories are often far from students' homes or at perennial risk of being shut down [3]. Moreover, school values are often mismatched with communities' worldviews in these territories, with schools positioning the future of young generations in high-density territories, such as cities [26,27]. There is, however, a consensus that such results would benefit from a more granular analysis [3,28] and stronger causal interpretation [3].
It is important to underline, however, that some high-density areas in the suburban belts of major cities also present worrisome educational outcomes due to very specific reasons. These territories have become more diverse from a cultural point of view but also more socially vulnerable [8]. These communities often rely on public services and programs instead of extended families for accessing services such as education, but also to find social and instrumental support. Subsequently, educational programs struggle to respond to students' growing diverse backgrounds, with negative impacts on school outcomes [7]. In light of this, we propose examining the role of different contextual factors and educational resources in explaining disparities across low-and high-density Portuguese municipalities.

Secondary Education Attainment and Contextual Factors
By contextual factors, we mean important socioeconomic municipal indicators related to the population's income, educational level, or occupational status, as well as municipal investment in non-formal education. These factors may contribute to disparities in student outcomes across territories. Research has shown that students from low-density areas show more vulnerable socioeconomic profiles as well as decreased school performance [29]. This usually translates into lower educational outcomes in these territories, such as more prevalent early reading difficulties [30] or a lower probability of students from these areas applying to college [31].
According to Eurostat [32], in 2021, low-density territories across the European Union showed a higher risk of poverty and a much lower rate of people who had attained tertiary education, while employment rates were identical to those in affluent areas. In Portugal, in the same year, low-density rural areas compared worse to the rest of the territory in terms of risk of poverty (26.2%; 16.4% in suburban areas; 15.6% in urban areas), rate of people aged 30-34 who have completed tertiary education (27.7%; 46.6% in suburban areas; 49.3% in urban areas), and slightly lower employment rates (72.7%; 76.3% in suburban areas; 76.7% in urban areas) [32].
An important part of the educational territorial context is the investment in education made by municipalities. This investment can include both infrastructure and human resources. Previous studies indicate a positive association between municipal school spending and overall education outcomes [33]; specific outcomes, such as Math or Language grades [34]; and future post-secondary education enrollment [35]. Still, investing solely in infrastructure is insufficient to improve school achievement [36] and is only relevant in more deprived regions (both high-and low-density) or for students coming from vulnerable households [37].
In Portugal, existing official documents, such as annual municipality reports, divide the municipal budgets across the country by main financial lines (expenses, revenues, taxes, etc.), but often do not provide a detailed description of local investments by specific domains (e.g., education) and types of expenditure (e.g., infrastructure, human resources, etc.). Therefore, we can only describe the municipal investment in education by approximation. Specifically, the National Institute of Statistics collects yearly data about the level of municipal investment in culture and sports. This covers spending on cultural events, libraries, museums, and sports events, among others. In 2018, the latest year covered by our report, the municipal investment in culture and sports ranged considerably across municipalities, from 2.3% to 28.8% of the total municipal budget.

Secondary Education Attainment and Educational Factors
Educational factors, such as digitalization, preschool enrollment rates, school enrollment rates, or the capacity to retain teachers, may also help explain differences in students' school attainment across municipalities. Generally speaking, all types of resources are scarcer in low-density areas. For instance, principals from rural schools tend to report greater resource shortages and how this is detrimental to learning when compared to their counterparts in urban schools [29]. Still, other findings pinpoint that unfair distribution of resources undermines the performance of those who live in more disadvantaged contexts in both high-and low-density areas [38].
One growing concern is students' equal access to technology across low-and highdensity territories and its consequences [39]. Increasing access to technology does not improve school attainment by itself, and it may even decrease. Students who use technology mainly for communicating and entertainment purposes tend to have lower academic performance [40,41]. Thus, interventions aimed at improving access to technology should be followed by an investment in teacher training, educational software, and educational usage of technology [39]. Portugal has implemented the National Digital Competencies Initiative 2030 [42]. This strategy was designed to overcome deficits in students' digital skills [43] and encompasses measures such as staff training, dissemination of ICT content in basic education, and development of computation programs in the first six years of basic education [42]. This strategy has resulted in significant investments in infrastructure, although it remains unclear if these are evenly spread across the country [43].
Preschool enrollment is another educational factor that has been positively associated with school attainment. This is particularly true for students coming from disadvantaged backgrounds and territories, since it can mitigate inequalities derived from the features of their family and socioeconomic contexts [44]. Preschool education can help improve school readiness, which has a major impact on students' school attainment [45,46]. Moreover, preschool attendance has better long-term results in school achievement than later remediating interventions, both worldwide and in Portugal [44,45,47]. The location of preschool settings (low-density vs. high-density) may be associated with differences in the structural features of the environment and working conditions for staff (e.g., higher proportions of one-teacher preschools in rural areas [48]) and, subsequently, with differences in the quality of young children's experiences, namely through teacher-child interactions [49]. However, these associations have been overlooked in most research [50]. The few studies available, namely in China and the United States, suggest that rural areas have fewer available preschool settings and show lower quality provision when compared with urban settings, even though they may benefit from lower child-adult ratios [50][51][52]. In Portugal, evidence on preschool settings in high-vs. low-quality density municipalities is also scarce. Nevertheless, in 2017, the preschool attendance rate of 5-year-olds in Portugal was 89% in rural and 96% in urban settings [53].
Secondary education enrollment is also considered fundamental to prepare students to be full citizens. Despite the progress achieved between 2000 and 2019, namely a marked decrease in the number of secondary school-age young people outside the school system, there is still an urgent need to reduce regional and socioeconomic disparities in access to this level of education. Secondary school enrollment rates are much higher in urban settings worldwide [54], including in Portugal (blinded for review).
Previous studies have also reported that the capacity to retain teachers is crucial for school attainment [4,55]. Having a permanent contract means teachers face fewer mobility problems and can be more committed to their students in the long run [56]. Schools in low-density territories, such as rural areas, have more difficulty in retaining teachers, meaning there are fewer well-prepared teachers motivated to live and work in these areas [4]. Moreover, teachers working in low-density territories report that they require more support to deal with challenges inherent to the school-parent relationship, due to these communities' greater social proximity. This may also contribute to lower percentages of permanent teachers in these areas [3]. In the long term, low teacher retention rates lead to bigger shares of older teachers in the later years of their careers, who are likely to face more challenges to their resilience and effectiveness, such as stress or feeling that their profession is not valued by society [57,58]. In 2018, about 80% of Portuguese teachers had a permanent contract. Furthermore, 47% of teachers in Portugal were aged 50 and above. In the case of upper secondary school teachers, Portugal ranked first in terms of teachers' average age and teaching experience (in number of years) compared to OECD countries involved in the TALIS study [59]. Moreover, only 9% of teachers agreed or strongly agreed that their profession is valued in society, which is lower than the average across OECD countries and economies participating in TALIS (26%). Also, 35% of Portuguese teachers reported experiencing "a lot of stress" in their work compared to the OECD average (18%) [59].

The Present Study
We examined students' secondary school completion rates across Portuguese municipalities between 2009 and 2018 to ascertain whether the change in this indicator was associated with contextual or educational resource factors. We also investigated if these associations were moderated by contrasting types of municipalities (i.e., high-and low-density). All study variables were therefore collected, taking the municipality as the unit of reference. We expected that high-density municipalities would show higher increases in secondary school attainment compared to those in low-density areas (Hypothesis 1). We also anticipated that, overall, secondary school completion rates would be associated with lower poverty rates (Hypothesis 2); lower unemployment rates (Hypothesis 3); higher rates of women with tertiary education (Hypothesis 4); higher annual rates of investment in culture and sports (Hypothesis 5); lower average number of students per computer (Hypothesis 6); higher preschool enrollment rates (Hypothesis 7); higher secondary school enrollment rates (Hypothesis 8); and higher permanent teacher rates (Hypothesis 9). Anticipating a positive effect of preschool enrollment in vulnerable contexts, we also estimated a significant increase in secondary school conclusion rates at higher levels of preschool enrollment among low-density municipalities, compared to higher levels of preschool enrollment among those of high-density municipalities (Hypothesis 10).

Context
We used data from 253 out of 308 Portuguese municipalities [60-62]. We identified 27 municipalities in mainland Portugal that did not present data for secondary school completion rates for all time points. The remaining 28 municipalities are in two archipelagos (the Azores and Madeira). These regions have their own regional educational authority and criteria for encoding educational data and were not included in this study.

High-and Low-Density Municipalities
Municipalities were divided into two categories: low-and high-density. We followed a composite classification of municipal territories based on population density, settlement, geographic, socioeconomic, and accessibility criteria. These were presented by the Interministerial Coordination Commission [9] and adopted by the Portuguese Association of Municipalities.

Contextual Factors
We described poverty using the municipal rate of Social Inclusion Income (SII), a monthly allowance paid by Social Security to help individuals or families cope with their most immediate needs. The allowance is associated with a program designed to promote the beneficiaries' social and professional inclusion [63]. We also collected data on unemployment rates of people aged 15-64 registered in local employment agencies as unemployed who are seeking a job, are immediately available, and have the capacity to work [64]. Moreover, we collected data on the proportion of women who had completed tertiary education in each municipality [65]. This indicator is defined according to the International Standard Classification of Education (ISCED) defined by UNESCO [66], meaning the tertiary education level corresponds to levels 5-8. We chose this indicator given that women's educational attainment is considered a strong predictor of children's school outcomes [67]. Finally, we collected data on the annual rate of investment in culture and sports. This information is collected every year by the Portuguese statistics institute to characterize local funding for facilities such as libraries as well as arts, sports, and cultural events and is provided in absolute values (in Euros) [68]. We included this factor as a measure of the relative importance of non-formal education investment across Portuguese municipalities.

Educational Resources
We collected data on the average number of students per computer in school [60-62] to capture the level of infrastructure modernization, as well as the spread of technology in schools. We also collected data on the preschool enrollment rate, meaning the share of children aged 3-5 enrolled in preschool [60-62,69]. Moreover, we retrieved data on the secondary school enrollment rate, corresponding to the proportion of students enrolled in secondary education within the expected age, compared to the population of the municipality within the same age class. This indicator corresponds, therefore, to the net enrollment rate in secondary education [60-62]. Finally, we collected data on the proportion of permanent teachers, meaning those having a long-term contract with the Portuguese Ministry of Education [60-62].

Secondary School Completion
We also collected the rate of secondary school completion, meaning the proportion of students who succeeded in concluding secondary school and could apply to a university, regardless of their age [60-62].

Data Collection
All variables were collected at the municipal level for three time points: 2009, 2013, and 2018. The only exception was the proportion of women who had completed tertiary education, which was collected only for 2011, based on the national census estimates.
The municipalities' classification was provided by the Portuguese Association of Municipalities. Contextual factors were collected by the National Institute of Statistics and were available in public datasets. Data on educational resources were also made publicly available by the General Direction of Statistics in Education and Science in the Education in Numbers annual reports. The municipal rate of permanent teachers was made available upon request by this governmental department.
The panel of indicators was compiled for the public education sector only, based on data availability. In 2018, the public education sector included 80.10% of all students, 72.50% of all schools, and 86.40% of the teachers in Portugal [43]. Educational resources were calculated for the secondary school level, except for the preschool enrollment rate. As an example, the average number of students per computer is described for secondary school students only.

Data Analyses
All the analyses were performed using SPSS 25.0. We started by conducting a missing values analysis before running descriptive analyses for all the variables for all data time points overall and by type of municipality. We then conducted several Analyses of Variance (ANOVA) to check if mean estimates were significantly different across low-and high-density municipalities for each time point. Subsequently, we computed bivariate correlations in general (which are present as a Supplementary Materials to this paper) and for low-and high-density municipalities.
Finally, we assessed the associations between all factors and secondary school completion rate using a Linear Mixed Model (LMM) approach. LMMs are extensions of linear regression models that include random effects and correlated errors [70]. We followed this approach by specifying a random intercept for each participant based on a Maximum Likelihood (ML) estimation method. To implement LMMs in the SPSS software, the dataset was organized in a long format, with the different time points being aggregated in one single score for each variable. To choose the most robust solution, we assessed model fit considering AIC and BIC indexes. We considered both fit indexes, as they can help establish a balanced decision between the solution best fitting reality, provided by BIC, and one that enables relevant information to be retained, usually provided by AIC. As an example, if the BIC index indicates that a 3-factor model is the best fitting model and AIC proposes that a 5-factor model is the best fitting solution, it makes sense to select from 3-, 4-, and 5factor models, depending on the information that is theoretically worth retaining [71].
We established an LMM baseline model for the main effects of the selected factors on secondary school completion rate based on the estimated general correlations. Given that SII and unemployment rates presented the strongest correlation among factors, we decided to establish the baseline model around these variables in three consecutive rounds of iterative model estimations. In the first round, our baseline model included the type of municipality and SII as factors, with subsequent models including the remaining factors being added and dropped out. This process was repeated twice, firstly with the type of municipality and unemployment rate included as factors for a baseline model, and secondly with the type of municipality, SII, and unemployment rate as a baseline model. Fit indexes for each model are presented in the Supplementary Materials. After establishing the most suitable model, we added interaction terms between the type of municipality and preschool enrollment rates.

Descriptive Statistics
Except for SII, all contextual indicators showed a decrease from 2009 to 2013, followed by an increase between 2013 and 2018. Indicators of educational resources showed disparities, with some denoting a steady average improvement (e.g., secondary school enrollment rate), contrary to others that show a mixed evolution. When comparing low-and high-density municipalities across the selected variables, several statistically significant differences should be noted. Firstly, SII rates were significantly higher in low-density municipalities in 2009 (p < 0.001), 2013 (p < 0.05), and 2018 (p < 0.001). Moreover, the average rate of women who completed tertiary education was significantly higher in high-density municipalities in 2011 (p < 0.001). Regarding educational resources, the average number of students per computer in high-density municipalities was higher in 2009 (p < 0.001), 2013 (p < 0.001), and 2018 (p < 0.001), contrary to preschool enrollment, which was significantly higher in low-density municipalities in 2013 (p < 0.001) and 2018 (p < 0.001). Still, this indicator improved by 8 percentage points between 2009 and 2018 in high-density municipalities. Also, the average number of permanent teachers was higher in high-density municipalities in 2013 (p < 0.001) and 2018 (p < 0.001). Finally, in 2013, at the peak of the economic crisis, secondary school completion rates were significantly lower in low-density municipalities (p < 0.01).

Correlational Analysis
Tables 1 and 2 depict the results of the correlational analysis by municipality density.   We found that in high-density municipalities, higher unemployment rates were associated with a decrease in secondary school attainment (p < 0.01). Conversely, higher municipal investment in sports and education (p < 0.05), a higher average number of students per computer (p < 0.01), a higher preschool enrollment rate (p < 0.01), and higher rates of secondary school enrollment (p < 0.01) were all associated with increased school attainment in high-density municipalities. In low-density municipalities, however, secondary school completion change showed negative small-sized correlations with higher SII rates (p < 0.01) and higher unemployment rates.

Linear Mixed Models
The selected LMM was significant: Wald χ 2 (5, 248) = 15.55, p < 0.000, AIC = 5695.29; BIC = 5732.28. While 3-factor and 4-factor solutions provided a best-fitting solution according to the BIC index, we retained the 5-factor model as it included two factors-secondary school enrollment rate and permanent teachers' rate-which were theoretically relevant. According to Table 3 (Model 1), growing unemployment rates were associated with a decrease in secondary school completion rates across the assessed time points (B = −1.12; p < 0.001). Moreover, the increase in preschool enrollment rates between 2009 and 2018 was also associated with an increase in secondary school completion rates (B = 0.10; p < 0.05). Conversely, an increase in permanent teachers' rates was associated with a decrease in secondary school completion rates across the decade (B = −0.09; p < 0.05). * p < 0.05; ** p < 0.01; and *** p < 0.001. a . Variable coded as 0 = low density and 1 = high density.
Subsequent examination (Table 3, Model 2) revealed a significant interaction between type of municipality and preschool enrollment rate. In this case, the LMM was significant: Wald χ 2 (6, 247) = 15.59, p < 0.000, AIC = 5689.83; BIC = 5731.44. Specifically, we found a considerable increase in secondary school conclusion rates at higher levels of preschool enrollment among high-density municipalities (B = 0.25; p < 0.01). Figure 1 depicts this interaction.

Municipal Density and Secondary School Completion Rates
Our research efforts led us to four overriding conclusions. Firstly, contrary to our expectations expressed in Hypothesis 1, lower municipal density was positively associated with secondary school attainment in the period from 2009 to 2018 compared to high-density municipalities. These differences were only significant in 2013, at the peak of the economic crisis. While the proportion of students completing secondary education increased from 2013 to 2018 in both types of territories, these remained higher in low-density municipalities. Moreover, when considering both direct and interaction effects (LMM, Model 2), changes in secondary school completion rates from 2009 to 2018 were significantly worse for high-density municipalities. Thus, our first hypothesis was not confirmed.
Prior reports suggest that students from more affluent territories outperform their counterparts from less affluent ones [25]. These results are often explained by a lack of infrastructure, such as school facilities [3], or a mismatch between traditional community values dominant in low-density regions and liberal worldviews presented by schools [25]. The unexpectedly lower performance of high-density municipalities in our study can be explained by limitations in educational policies addressing increased social and cultural diversity in Portuguese suburban areas. These areas, especially those around the biggest Portuguese cities, have become considerably more heterogeneous in the past two decades. This has demanded greater flexibility from curricula and teachers to adjust to contrasting backgrounds-something that often has not been achieved [8,72]. A bulk of national policy measures have been implemented across the country to reduce early school leaving from education and training, such as the generalization of vocational education and training [73]. This more diverse curricular offer is still far from matching students' needs in high-density areas. Here, professional expectations among students are more nuanced, with some niches (e.g., DJing) not being covered by the more traditional vocational tracks offered by schools [72]. In turn, the secondary educational offer provided by low-density municipalities is often insufficient but has improved significantly over the past decade. A more diverse curricular coverage, particularly in the vocational education and training field, is seen as one of the main reasons for the reduction in early school leaving from education and training and for an increase in the secondary school enrollment rates in Portugal, including in low-density areas [16,73]. National, transient youth mobility trends associated with the economic crisis in the early years of the period examined may also have played a role in explaining our first main finding. International scholarship [3,5] specifically acknowledges that high youth outmigration fluxes are detrimental to secondary education attainment in low-density areas. Indeed, the more academic-minded students tend to leave or commute from less affluent municipalities, contrary to those with narrower educational expectations and displaying worse academic performance. Between 2009 and 2014, there was, however, a relative increase of 14.6 percentual points in the young population aged 15-29 living in Portuguese low-density areas [10]. This meant that some young people, especially those who were more academically minded, kept studying in low-density municipalities or started to commute to nearby low-density municipalities as their parents also stopped commuting to high-density municipalities on a daily basis due to unemployment. In this period, our descriptive and univariate analyses do show that in both 2009 and 2013, secondary school conclusion rates in low-density municipalities were higher and significantly higher compared to high-density areas in 2013. Interestingly, these differences are not significant anymore in 2018. By that time, the youth population under 29 had already declined by 9.8 percentual.

Contextual Factors and Secondary School Completion Rates
Secondly, regarding the role of contextual factors (Hypotheses 2-5), we found that growing unemployment rates were associated with a decrease in secondary school completion rates across the assessed time points in both LMM Models 1 and 2. The only difference between these models was that the negative effect of unemployment in changing secondary school completion rates was slightly lower in Model 2. This result matched our expectations (Hypothesis 3), as unemployment rates rose during the 2009-2013 period and slowly decreased from 2014 to 2018. From that perspective, we considered unemployment as a good proxy of contextual socioeconomic status during the study period. This result is in line with a well-established trend showing that economic hardship is a significant predictor of school underachievement [56].

Educational Resources and Secondary School Completion Rates
Thirdly, considering educational resources at the municipal level (Hypotheses 6-9), we found that an increase in the proportion of permanent teachers was associated with a decrease in secondary school completion rates. This result was similar across both LMM Models 1 and 2. Thus, Hypotheses 9 was not confirmed. Higher rates of permanent teachers are usually associated with positive educational outcomes, including in low-density territories [4]. However, more secure teaching contracts are more common among older teachers, who often face challenges such as higher levels of stress or negative feelings about the social representation of their profession [57,58]. This is particularly true in Portugal, where a considerable percentage of teachers are aged 50 and above, especially in upper secondary schools [59]. Therefore, we conclude that higher rates of permanent teachers across Portuguese municipalities are associated with a significant decrease in secondary school completion rates due to the challenges associated with teachers' aging trends.

Preschool Enrollment and Secondary School Completion Rates
Fourthly, we found that increases in preschool enrollment rates between 2009 and 2018 were associated with increases in secondary school completion rates (LMM Model 1), thus confirming Hypothesis 7. Portuguese public policies have addressed preschool as a priority of the educational system, namely, to reduce inequalities derived from socioeconomic conditions [44], improve school readiness, and generally contribute to better longterm school achievement, including in secondary education [44,47]. Considering the time difference covered by our dataset (2009)(2010)(2011)(2012)(2013)(2014)(2015)(2016)(2017)(2018), these findings cannot be expected to reflect the individual positive change and learning outcomes associated with preschool attendance [74,75]. Instead, it is arguable that increases in preschool enrollment rates at the municipality level support family employability [75,76], thus increasing the economic and social capital of families and their communities. While increases in maternal employment might vary as a function of children's age and family socioeconomic status [76], even small increases may have nontrivial effects on family income and resources, with spill-over effects for older siblings, for example. Importantly, we found a significant increase in secondary school conclusion rates at higher levels of preschool enrollment among high-density municipalities (LMM Model 2). This finding was not consistent with Hypothesis 10. It is possible that preschool enrollment is particularly important to allow families with young children to enter/return to the job market in high-density municipalities, where jobs are more widely available, and extended family support is more limited. In low-density municipalities, however, career prospects are lower and higher preschool enrollment may not result in increases in maternal employment and related economic and social capital, as discussed above [5]. Another potential explanation for this interaction effect may be associated with the quality of preschool classrooms available in high-and low-density municipalities. Indeed, there are a few reports of lower-quality provision in preschool classrooms located in rural (vs. urban) settings in China and in the US [50][51][52]. While similar studies do not seem to be available in Portugal, structural features, such as higher proportions of one-teacher preschools in Portuguese rural areas [43], may be negatively associated with the quality of children's educational experiences in these settings, hindering their potential long-term social and cultural benefits. Note that an observational study in early childhood classrooms serving infants reported higher teacher-child relationship quality in non-urban centers, as well as less teacher experience in urban classrooms [77,78]. However, to the best of our knowledge, similar evidence is not available for preschool settings. Thus, additional examination of the structural features and quality of preschool classroom practices across low-and high-density areas is warranted.

Implications and Limitations
Our results show that the pessimistic narrative about low-density territories may be overstated. Indeed, Portuguese low-density municipalities outperformed high-density municipalities in terms of secondary school completion rates in 2013 and 2018, and these differences were significant at the peak of the economic crisis. Accordingly, educational resource allocation must consider nuanced territorial disparities, especially during critical periods, including in high-density areas. Moreover, our findings underline the need for in-depth, comparative case studies across Portuguese municipalities to uncover educational best practices in both high-and low-density territories to inform decision making. This is especially the case after the recent decentralization of education competencies in Portugal.
Our findings also highlight that the investment in (high-quality) preschool education must continue to be a flagship priority of policies. In the Portuguese case, prioritizing preschool education to promote later secondary school attainment and uphold more secure transitions to the labor market is particularly relevant in suburban areas of major urban centers. Here, informal ties are weaker, resources might also be scarce, and on-the-ground programs need to address the cultural diversity of a more heterogeneous student population to fully achieve social inclusion aims [8]. Moreover, in Portugal, access to preschool in these areas facilitates labor market enrollment, especially for young mothers. This may contribute to improving the household economic situation, further strengthening conditions for children's future school achievement and preventing high rates of female, inactive NEETs [78]. Thus, efforts to improve educational delivery and outcomes need to increasingly include a spatialities angle, tailoring them according to each region's singularities. In some cases, preschool may be less accessible in low-density territories [3]. Nonetheless, the needs of suburban areas must be accounted for in improving overall educational access and inclusion [8]. Instruments such as the NextGeneration EU or the Reinforced Youth Guarantee are policy instruments that can help Portugal move forward in realizing these goals.
While our results cannot be generalized internationally, we believe that this report may inspire research efforts to reveal school achievement disparities at the subnational/regional level, especially across European countries. Indeed, there is a growing consensus that regional asymmetries in secondary education outcomes lack sound scientific understanding. Therefore, research efforts that can further explain school education attainment differences across municipalities and regions will certainly lead to more informed decision making, one that matches both high-and low-density municipalities' specific requirements [79,80].
Our results must be interpreted with caution. While secondary school completion is a relevant descriptor of the system's success, it is still a generic measure that does not enable a more detailed analysis of student achievement, such as grades. Moreover, our analysis covered only the public education sector, which accounts for 80.1% of all secondary education students. A more complete picture of territorial inequalities would, therefore, be achieved by including the private sector. However, data from this education sector are not publicly available in Portugal. Finally, our results are limited to Portugal's mainland as data on secondary school completion in the Portuguese islands follow other methodological procedures.

Conclusions
With our study, we conclude that the success story of Portuguese secondary education for the past decade is also one of improvement of secondary education completion rates in low-density territories. Indeed, secondary school completion between 2009 and 2018 has improved more in low-density municipalities compared to high-density territories. Our result was unexpected, showing that Portuguese educational authorities must provide enough resources to more affluent areas to promote successful educational trajectories, making the most of the recent decentralization process. At the same time, policymakers must keep an eye on less affluent, rural municipalities, which, by definition, struggle with funding and human capital shortages to promote high-quality education.
Among the contextual level factors, the role of unemployment rates in explaining lower secondary completion shares adds to mounting evidence demonstrating that more favorable households' economic conditions promote school achievement. This result is not new. However, Portugal has been exposed to the damaging social effects of successive structural crises. The expected negative educational repercussions of those crises must, therefore, be prevented or rapidly mitigated through public policies, particularly in the context of a positive evolution of school achievement across the country.
At the educational factor level, our results also suggest that Portugal must take quick steps to support specific problems faced by teachers as a professional group (e.g., aging and high levels of stress). Such challenges constitute one of the main challenges to the Portuguese educational system, requiring measures across all types of territories. Nevertheless, the lower capacity of less affluent municipalities to retain high-quality, young teachers must be considered to make sure the progress in secondary education completion rates made in these territories for the past decade is not lost.
Our findings also underline that, in some cases, investment and resources are needed to support preschool enrollment in high-density areas.
Overall, the nuances highlighted by our study must encourage scholars to further develop a territorialized approach to secondary school results to better realize the ambitious European and national goals in the years to come in terms of preventing early school leaving and thus equipping younger generations with the necessary certification requirement and skills to succeed, later on, in the labor market. writing-original draft preparation, D.G., F.S. and C.A.; writing-review and editing, D.G., F.S., C.A., A.R. and V.L. All authors have read and agreed to the published version of the manuscript.
Funding: This publication is based upon work from COST Action CA18213 Rural NEET Youth Network, supported by COST (European Cooperation in Science and Technology)..