1. Question and why it matters

This report examines whether changes in Nigeria’s economy (GDP per capita, inflation, unemployment) are associated with primary school enrolment between 1990 and 2023. [Add 2 sentences on why this matters, for example for education policy or planning.]

2. Data

  • Source: World Bank World Development Indicators (WDI)
  • Period: 1990-2023, annual
  • Variables: GDP per capita (constant US$), inflation (annual %), unemployment (% of labour force), primary school gross enrolment (%)
ng <- read_csv("data/nigeria_wdi_raw.csv")
glimpse(ng)
## Rows: 34
## Columns: 8
## $ country      <chr> "Nigeria", "Nigeria", "Nigeria", "Nigeria", "Nigeria", "N…
## $ iso2c        <chr> "NG", "NG", "NG", "NG", "NG", "NG", "NG", "NG", "NG", "NG…
## $ iso3c        <chr> "NGA", "NGA", "NGA", "NGA", "NGA", "NGA", "NGA", "NGA", "…
## $ year         <dbl> 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 199…
## $ gdp_pc       <dbl> 1577.196, 1541.591, 1571.190, 1498.959, 1433.389, 1395.07…
## $ inflation    <dbl> 7.364400, 13.006973, 44.588843, 57.165253, 57.031709, 72.…
## $ unemployment <dbl> NA, 3.831, 3.790, 4.023, 4.064, 4.152, 4.043, 3.964, 3.92…
## $ enrolment    <dbl> 83.10286, 82.32250, 86.74438, 91.29586, 91.53790, 87.4475…

3. Cleaning

ng_clean <- ng %>%
  select(year, gdp_pc, inflation, unemployment, enrolment) %>%
  arrange(year)

tibble(variable = names(ng_clean),
       missing_values = colSums(is.na(ng_clean))) %>%
  knitr::kable()
variable missing_values
year 0
gdp_pc 0
inflation 0
unemployment 1
enrolment 5

rows with missing values were dropped automatically in the regression.

4. Exploration

ng_clean %>%
  pivot_longer(-year, names_to = "indicator", values_to = "value") %>%
  ggplot(aes(year, value)) +
  geom_line() +
  facet_wrap(~indicator, scales = "free_y") +
  labs(title = "Nigeria: key indicators, 1990-2023",
       x = NULL, y = NULL, caption = "Source: World Bank WDI")

Inflation spiked sharply in the mid-1990s, peaking above 70%, then stayed mostly below 20% before rising to about 24% by 2023. GDP per capita fell slightly in the 1990s, rose steadily from about 2000 to a peak around 2014, then declined. Enrolment stayed mostly between 80% and 95%, but shows an unusually sharp drop around 2015 and several missing years, which is examined in section 6.1.

5. Methods

  • OLS regression to test the association between enrolment and the economic indicators, with checks for multicollinearity (VIF) and autocorrelation (Durbin-Watson).
  • ARIMA model to forecast inflation for the next 5 years.

6. Results

6.1 Regression

model <- lm(enrolment ~ gdp_pc + inflation + unemployment, data = ng_clean)
summary(model)
## 
## Call:
## lm(formula = enrolment ~ gdp_pc + inflation + unemployment, data = ng_clean)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -50.903  -1.668   2.329   6.260   9.663 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  126.080846  20.571122   6.129 2.48e-06 ***
## gdp_pc        -0.014946   0.006601  -2.264   0.0329 *  
## inflation     -0.084178   0.160344  -0.525   0.6044    
## unemployment  -2.469296   4.367566  -0.565   0.5771    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.26 on 24 degrees of freedom
##   (6 observations deleted due to missingness)
## Multiple R-squared:  0.2207, Adjusted R-squared:  0.1232 
## F-statistic: 2.265 on 3 and 24 DF,  p-value: 0.1067
vif(model)
##       gdp_pc    inflation unemployment 
##     1.403639     1.361158     1.045978
dwtest(model)
## 
##  Durbin-Watson test
## 
## data:  model
## DW = 1.8987, p-value = 0.2239
## alternative hypothesis: true autocorrelation is greater than 0
par(mfrow = c(2, 2)); plot(model); par(mfrow = c(1, 1))

In the full model, GDP per capita was the only statistically significant variable (p = 0.033). Its coefficient of -0.015 means each additional US$100 of GDP per capita was associated with a 1.5 percentage-point lower enrolment rate, holding other variables constant. Inflation (p = 0.604) and unemployment (p = 0.577) were not significant. The model as a whole was not significant (F-test p = 0.107) and explained about 22% of the variation in enrolment (adjusted R-squared = 12%). VIF values below 1.5 show no multicollinearity problem, and the Durbin-Watson test (p = 0.224) shows no significant autocorrelation. However, the residual plots show one extreme observation (2015), where enrolment falls far below all other years and which may be driving the GDP result.

6.2 Inflation forecast

infl_ts <- ts(ng_clean$inflation, start = 1990, frequency = 1)
fit <- auto.arima(infl_ts)
summary(fit)
## Series: infl_ts 
## ARIMA(2,0,0) with non-zero mean 
## 
## Coefficients:
##          ar1      ar2     mean
##       0.9693  -0.3153  18.1591
## s.e.  0.1602   0.1586   4.7757
## 
## sigma^2 = 107.7:  log likelihood = -126.72
## AIC=261.43   AICc=262.81   BIC=267.54
## 
## Training set error measures:
##                     ME     RMSE     MAE       MPE     MAPE      MASE
## Training set 0.1956489 9.908401 6.24735 -17.07859 37.20106 0.9621552
##                     ACF1
## Training set -0.03063995
checkresiduals(fit)

## 
##  Ljung-Box test
## 
## data:  Residuals from ARIMA(2,0,0) with non-zero mean
## Q* = 8.7662, df = 5, p-value = 0.1188
## 
## Model df: 2.   Total lags used: 7
autoplot(forecast(fit, h = 5))

The automatic model selection chose an ARIMA(2,0,0) model for inflation. The forecast suggests inflation of about 25% in 2024, moving to about 20% by 2028. However, the uncertainty range is wide: by 2028 the 95% interval runs from 0% to 50%. This means the forecast should be read as a rough indication of direction, not a precise prediction, especially because inflation in Nigeria has been affected by sudden policy and exchange-rate changes that a simple model cannot anticipate.

6.3 Key findings

    • GDP per capita was the only variable significantly associated with enrolment (p = 0.033), with a negative sign: about 1.5 percentage points lower enrolment per additional US$100. This result [depends on / holds after removing] the 2015 outlier.
  • The model overall was weak: it explained about 22% of the variation in enrolment and the overall F-test was not significant (p = 0.107). Inflation and unemployment showed no significant link.
  • Inflation is forecast to ease from about 25% in 2024 to about 20% by 2028, but the 95% interval is very wide, so treat this as indicative only.

7. Limitations

  • Only 28 usable yearly observations after dropping 6 years with missing data, so results are indicative, not strong evidence.
  • Association is not causation, and yearly series that trend over time can appear related by coincidence.
  • Enrolment contains one extreme value (2015) that strongly affects the regression. It may reflect a data or reporting issue.
  • The inflation model is heavily shaped by the 1990s spike and cannot anticipate policy shocks.

8. Conclusion and recommendation

In this analysis, GDP per capita was weakly and negatively associated with primary school enrolment in Nigeria between 1990 and 2023, while inflation and unemployment showed no significant link. The overall model explained little of the variation in enrolment, and the GDP result depends on one extreme observation in 2015. This suggests national economic indicators alone do not explain enrolment well. Inflation is forecast to ease to about 20% by 2028, but with a very wide uncertainty range.

Recommendation: Check the unusual 2015 enrolment value against UNESCO Institute for Statistics or National Bureau of Statistics data before relying on it. Future work should use state-level or household-level data, such as the Nigeria Demographic and Health Survey, to identify what drives enrolment, since national averages hide large regional differences.


Data: World Bank WDI. Analysis in R.