Analysis code for "Resource Provision and Pedagogical Enactment: Evaluating School Capacity for Computational Work in 90 Education Systems"
Description
This deposit contains the Python script that reproduces every table, figure and reported quantity of the associated article from the PISA 2025 school questionnaire public use file (CY09_MS_SCH_PUF). The script recodes the reserved missing-value codes of the international database, establishes the dimensionality of sixteen school capacity items by principal component and factor analysis on the pooled international sample of 25,133 schools in 90 education systems, forms two scale scores for resource provision and pedagogical enactment, partitions the variance of each between systems and between schools within systems using a two-level random-intercept model estimated by profile likelihood with a delete-one jackknife over systems, and regresses each dimension on school characteristics within Indonesia, Viet Nam, Malaysia and Thailand. The PISA data file itself is not included. The OECD Terms of Use for the public use files prohibit distribution to third parties. The file is obtained free of charge from the OECD at https://www.oecd.org/en/data/datasets/pisa-2025-database.html after a short registration. Instructions are given in README.md. Twenty-nine quantities quoted in the article were compared with the script output and matched exactly.
Files
Steps to reproduce
This deposit contains the analysis code only. The PISA 2025 school questionnaire public use file is not redistributed here, because the OECD Terms of Use for the public use files prohibit making the data available to third parties. The file is obtained free of charge from the OECD. 1. Obtain the data. Go to https://www.oecd.org/en/data/datasets/pisa-2025-database.html, open "PISA data", then "Public Use Files (PUFs)", then "Download the datasets", and complete the short registration form. Download the school questionnaire file and extract CY09_MS_SCH_PUF.sav. 2. Prepare the environment. Python 3.11 or later is required. Download school_capacity_analysis.py, requirements.txt and README.md from this deposit into one directory, place CY09_MS_SCH_PUF.sav in that same directory, and install the packages with: pip install -r requirements.txt. The pinned versions are numpy 2.4.4, scipy 1.17.1, pandas 3.0.2, scikit-learn 1.8.0, matplotlib 3.10.9 and pyreadstat 1.3.6. 3. Run the analysis. Execute: python school_capacity_analysis.py. Runtime is about 15 seconds on an ordinary laptop. The script halts with an explicit message if the data file is absent. No arguments, paths or parameters need to be edited. 4. Check the outputs. The script writes six files into the working directory: table1_factor_loadings.csv, the rotated two-factor solution reported in Table 1; table2_four_systems.csv, the scale means, standard deviations and ranks reported in Table 2; table3_predictors.csv, the within-system regressions reported in Table 3; figure1_capacity.png, Figure 1; figure2_indicators.png, Figure 2; results_reported.json, 126 named quantities covering every figure quoted in the text of Sections 4.1 to 4.4. 5. Verify. Every number in the three tables, the two figures and the text of the Results section can be traced to a named entry in results_reported.json. Comparing that file against the article is sufficient to confirm the reported findings. Analytical steps performed by the script, in order: recoding of the reserved missing-value codes of the international database and reversal of the binary items so that higher values denote presence; principal component analysis and a varimax-rotated two-factor solution on the sixteen capacity items, with McDonald's omega and coefficient alpha for each subscale; construction of the two scale scores, rescaled to an international mean of 0 and a standard deviation of 1 using the senate weight so that every system contributes equally; two-level random intercept models with Method A weight scaling to partition the variance within and between systems; and within-system regressions of each capacity scale on school characteristics. Systems with fewer than 50 participating schools are excluded from the system-level tables and figures, which yields 79 systems for resource provision and 85 for pedagogical enactment.
Institutions
- Jambi UniversityJambi, Jambi City