How Military Expenditure Conditions the AI Readiness-Sustainable Development Nexus in Africa - Dataset
Description
This dataset is a cleaned cross-country panel covering African countries over 2020 to 2024, with the 2025 SDG score retained only for the forward-looking robustness test. It links artificial intelligence readiness, military expenditure and sustainable development performance, while also tracking macroeconomic controls that capture industrial structure, income level and trade openness. The dataset supports country-level comparison of how African economies prepare for AI adoption and how this readiness relates to SDG outcomes under different military-expenditure conditions. The .csv file can be used for the replication in Stata, while the .xlsx file contain all details below: Country and time identifiers: • cid: Unique numeric country identifier for sorting and panel estimation. • countryname: Official country name. • year: Observation year. The main estimation period is 2020 to 2024, while 2025 is retained only for the two-year-ahead SDG robustness check. AI readiness indicators: • ai: Overall AI Readiness Score, capturing national preparedness to adopt and deploy AI through government capacity, technology-sector maturity, and data/infrastructure readiness. • govai: Government AI readiness pillar, measuring public-sector preparedness for AI adoption through strategy, governance and ethics, digital capacity, and adaptability. • techai: Technology-sector AI readiness pillar, capturing the strength of the domestic technology ecosystem, including sector maturity, innovation capacity and human capital. • dataai: Data and infrastructure AI readiness pillar, capturing the enabling foundations for AI deployment through infrastructure, data availability and data representativeness. Security, institutional and economic indicators • milex: Military expenditure as a percentage of GDP, capturing defence-related expenditure relative to national economic output. • lnmilex: Natural logarithm of military expenditure, used in the main empirical models and interaction terms. • ind: Industry value added as a percentage of GDP, capturing the contribution of industry, including manufacturing, mining, construction, electricity, water and gas, to national output. • sdg: SDG Index Score, ranging from 0 to 100, capturing overall country-level progress toward the United Nations Sustainable Development Goals. • gdppc: GDP per capita in constant 2015 US dollars, used as a proxy for income level and broader economic-development capacity. • lngdppc: Natural logarithm of GDP per capita. • trade: Trade as a percentage of GDP, measuring the sum of exports and imports of goods and services relative to national output. • lntrade: Natural logarithm of trade openness. Mapping and visualisation variables: • mean_ai_z: Country-level mean z-score for AI readiness, used for the Datawrapper map. • mean_milex_z: Country-level mean z-score for military expenditure, used for the Datawrapper map. • mean_sdg_z: Country-level mean z-score for SDG performance, used for the Datawrapper map.
Files
Steps to reproduce
Step 1: Indicator sources used in the merged dataset • ai, govai, techai, dataai: Oxford Insights, Government AI Readiness Index, covering the overall score and the three pillar scores. • milex: World Bank, World Development Indicators, military expenditure as percentage of GDP. • ind: World Bank, World Development Indicators, industry value added series used in the file. • sdg: Sustainable Development Report, SDG Index score. • gdppc: World Bank, World Development Indicators, GDP per capita series used in the file. • trade: World Bank, World Development Indicators, trade as percentage of GDP. Step 2: Check missingness • Import the CSV and declare the panel: xtset cid year or tsset cid year. • The balanced country-year structure contains 220 observations: 44 African countries observed from 2020 to 2024. • Before targeted treatment, missingness was low overall: 43 missing cells out of 4,840 total cells = 0.89% overall missingness. • For modelling variables, missingness was concentrated in trade and milex. Trade had 14 missing values out of 220 observations = 6.36%, while milex had 9 missing values out of 220 observations = 4.09%. • Identifiers and classifiers were not imputed. Step 3: Targeted, income-matched imputation for trade • Burundi, low income: for each year from 2020 to 2024, compute the low-income mean of trade excluding Burundi; replace trade only where Burundi is missing. • Nigeria, lower middle income: for each year from 2020 to 2024, compute the lower-middle-income mean of trade excluding Nigeria; replace trade only where Nigeria is missing. • Rationale: this preserves income-comparable trade levels and avoids borrowing from higher-income distributions. Step 4: Linear interpolation/extrapolation for remaining trade gaps • For any remaining country with missing trade, fit within-country OLS: trade = a + b*year using that country’s non-missing years only. • Predict trade_hat for the missing years and replace trade only where missing. • This step applied only to the few remaining trade gaps: Lesotho (2024), Malawi (2024), and Togo (2023-2024). Step 5: Treatment of military expenditure missingness • Missing milex values were not imputed because military expenditure is the study’s key moderating variable and imputing it could distort the security-allocation channel. • Instead, observations with missing milex were excluded from the main regression sample, reducing the estimation sample from 220 to 211 observations. Step 6: Post-processing and validation • Confirm that trade has no missing values after imputation and that all non-trade variables remain unchanged. • Generate logged variables for positive scale variables: lnmilex, lngdppc, and lntrade. • Re-check summary statistics and missingness after processing. • Save the cleaned dataset as a new file so the raw dataset remains intact.
Institutions
- Asia Pacific University of Technology & InnovationKuala Lumpur, Kuala Lumpur
- Universiti Putra MalaysiaSelangor, Seri Kembangan