School failure (and early dropout) is usually centred at the secondary stage; low academic performance in previous educational stages may be the origin and cause of later failure and dropout. Therefore, competency and diagnostic tests carried out during the primary and secondary stages are essential to identify the pupils with the lowest levels of competences, with these being those with the greatest basic difficulties in educational development, and therefore potential school failure and drop-out pupils.
The significant consequences of school failure and school dropout, both at the individual and societal levels, have generated extensive academic literature and political, economic and social interest at both the national and international levels. International organisations, such as the United Nations in its Sustainable Development Goals—SDG-4, defend education as an enabler of upward socioeconomic mobility and an engine for the reduction of inequalities, with consequences for society: inequalities inhibit economic growth, fuel instability and intolerance, and drive fragmentation by deepening social gaps 
. Target 4.1 of SDG-4 is to ensure that by 2030 “all girls and boys complete free, equitable and quality primary and secondary education leading to relevant and effective learning outcomes” 
. The non-completion of compulsory education is linked to the phenomena of school failure and dropout.
Although there is no consensus in the specialised literature on the consideration of school failure, “it can be used both to refer to the results of an individual and to those of the educational system that educates them” 
. Its conceptualisation and measurement is adapted to different levels and agents of the education system: pupils (the personal micro-level), schools (institutional meso-level) or the region (macro-level).
The identification of pupils with the lowest levels of competences, and their weight in the classroom, are factors to be taken into account when designing educational policies against school failure. Performance in key competences is one of the indicators of Objective 2 of the Europe 2020 strategy, and the European Council established that the percentage of fifteen-year-old pupils with low performance in reading, mathematics and science should be less than 15% in 2020. The consequences at an individual level for people with low skill levels include greater complications in their labour market insertion: jobs with lower qualifications and pay, with less stability, and when they lose their jobs, they have longer unemployment periods until they find the next one 
. The country-level consequences of high levels of educational failure are associated with lower long-term economic growth and increased social polarisation 
; high levels of educational attainment, however, can have a broad positive impact that will last for generations to come, enabling the sustainability of societies 
The Programme for International Student Assessment (PISA) tests use “PISA failure” as an indicator of failure for the group of pupils who do not reach level 2 skills. In PISA 2018, Spain had 25% of pupils below level 2 in mathematics proficiency, compared to 22% in the EU and 24% in the OECD. These values are far from reaching the Europe 2020 target, for which the threshold was set at 15%. In Spain, regional analysis shows important differences. In the region of Madrid, the position is slightly below the Spanish average, at 23%, which is between the EU and OECD levels. In relation to scientific competence, Spain matches the OECD average at 22%, and the region of Madrid improves on the national figure and matches the EU average, at 21% 
. In addition, Madrid is the case study of interest, because it is the third Spanish region with regard to the number of students enrolled in secondary education, after Andalusia and Catalonia, and it has the highest diversity in school ownership.
2. School Failure: Conceptualization, Causes and Consequences
At a macro level, school failure focuses on a region or country, and it is normally international institutions and organisations that develop the measurement methodologies, which are then carried out autonomously and harmonised by each area for international comparison. The OECD 
, for example, considers school failure during the compulsory education stage to be those pupils whose academic performance is significantly below the average (arithmetic mean) for their age group, i.e., pupils with low academic performance; the process of failure continues after finishing compulsory schooling, referring to pupils who drop out of school at that time, which is considered educational abandonment; and finally, during the working stage, those who do not achieve adequate preparation to develop their professional life 
The European Union 
counts school failure as the proportion of young people who have not completed compulsory education in each country. The measurement of this concept has some methodological limitations, as well as not having a uniform definition for international comparison 
. Spain associates the school failure rate with the failure to complete secondary education, and this characteristic is determined by national legislation, but it is not the same for the rest of the European countries.
conducted an in-depth review of the different definitions and ways of calculation used in Spain since 2000 
. The first of these is based on the Ministry of Education and Science, which measures school failure as the percentage of pupils who do not obtain the qualification certifying successful completion of compulsory education 
. The basis on which it is usually calculated is the number of pupils enrolled in the last year of compulsory education, and this indicator is defined as direct failure. Secondly, the Ministry of Education and Science calculates the gross graduation rate as the percentage between the number of pupils who have obtained the Compulsory Secondary Education (ESO in Spanish) diploma and the number of people who are 15 years old on 1 January of the year in which the indicator being measured ends; from this value, gross failure is defined as the percentage who do not graduate (100%—the gross graduation rate). In this measurement, early leavers are taken into account, but the number of repeaters in each year and other demographic problems that may vary the size of the cohorts and directly influence the calculation of the indicator are not considered.
A third way of measuring school failure from the data provided by the Labour Force Survey (LFS) is the LFS failure or school dropout rate, which is calculated as the percentage of 20–24 year-olds who did not obtain the compulsory education qualification. School dropout is therefore an indicator of school failure, as is early school leaving. This definition is used at an international level, and the European Union included it in the 2020 objectives, specifically indicating that it should be below 10% for the EU, and 15% for Spain, which started from higher values than the rest.
At both a macro and school level, tests on competencies (PISA, PIRLS and TIMSS at an international level, and diagnostic tests at a national and regional level) are particularly relevant. According to the OECD, and as it appears in different research 
, it is considered that a pupil does not have the minimum knowledge required if they obtain a score in the competency tests below level 2 (levels 1 (1a and 1b) and <1, from a maximum evaluation of 5); using this measurement, we speak of PISA school failure, counting this percentage of pupils in a classroom or educational centre.
The importance of using measurements of failure related to proficiency levels is well documented in the literature. Several studies 
show that reaching level 1 or lower reduces the probability of a pupil completing compulsory education. These authors point out, for the case of Spain, that pupils who do not reach PISA level 2 in the science test lack sufficient science skills to participate actively in everyday life or work situations related to science or technology, and reading skills may not lead to future success but, without them, there is an increased risk of encountering barriers to employment, reduced financial security and a worse social situation.
PISA failure is transferable to the national diagnostic tests conducted in Spain in each region. These tests, differentiated by subjects equivalent to those of PISA, have scales relating to proficiency levels, and it is possible to define and calculate school failure in an equivalent way in the regional diagnostic tests. The competency tests provide information on individual pupils, and they can compare their results with the average of their class, their school, and even their autonomous region and country. The average value of their competences should be a positive element for the evaluation and continuing improvement of pupils’ academic progress.
School failure is not a matter inherent to the pupil himself; thus, an interpretative framework is needed to help explain and understand all of the variables. This framework is the so-called “intersectionality” 
that determines the different factors and systems that influence school failure by considering the interdependence, interaction and intersection between them 
. The potential factors include the sectoral structure of the area, the ease of finding a job without higher education, the level of income, state investment, the importance of human capital and the unemployment rate, as well as other factors innate to the pupil that are more difficult to act upon 
2.2. Factors of the School Failure
There are elements internal and external to the education system that affect school failure, and they can act with greater potency when pupils have prior conditions that hinder their academic development. Therefore, it is essential to identify pupils who are at risk of failure at an early stage, so that interventions can be established to minimise dropout rates 
The process of school failure and dropout has been extensively analysed in the academic literature, which has focused mainly on the detection of factors that can be considered to be direct causes of failure and subsequent dropout. These factors have a temporal dimension which generally corresponds to the moment in time when the failure indicators are calculated; however, determinants are also found for which the temporal dimension is prior to failure. The latter can be considered as leading factors, because they influence failure, but information on them is available prior to the failure, allowing for early intervention.
Among these factors is the earlier-stage suitability rate 
. The suitability rate is the percentage of pupils of the considered age who are enrolled in the course that corresponds to their age 
. Both the suitability rate and its complementary measurement, the repetition rate, are leading factors of school failure. Repeating a year can be considered to be a predictor of dropout 
Another leading factor that is related to failure and dropout is absenteeism. When pupils accumulate unjustified absences, their academic performance suffers 
; the repetition of extended absences over time reduces the pace of learning, and signs of a possible school delay begin to appear, which, if not solved in time, would lead to subsequent dropout 
. Fernández-Enguita 
points out that the average number of unexcused absences is very high among early school leavers, which can be considered an indication of the relationship between both variables. Absenteeism, therefore, has negative effects on academic outcomes, in addition to other negative effects on socioemotional learning outcomes (self-efficacy, self-management and growth mindset), and causes a reduction in the social and educational engagement of the absentee 
The important consequences of school failure and dropout, both at an individual and society-wide level, have led to the creation of extensive literature on these phenomena. The classification of variables that are potential factors of school failure and drop-out differs according to the research. In this report, they will be grouped according to Romero and Hernández 
, who separate them by the type of cause, dimension and scope (Table 1
). This classification, considering exogenous factors, as opposed to endogenous factors, has its origin externally, or by virtue of external roots, such that it can facilitate the work of designing the strategies and policies of the different agents involved in the process of school failure and dropout.
Table 1. Classification of factors of school failure.
||Nursery education/Previous academic results/Repetition of previous years/Study habits
||Studies, qualification, recourses/Country of origin/Number of siblings/Type de family
||Type of relationship with peers
||Curriculum rigidity/Academic approach/Grade culture/Lack of investment
||Autonomy/Ownership/Segregation/Human resources/Peer effects/Material resources
||Economic and labour
||Labour market/Economic cycle
||Poverty/Dependence on social protection