Financial deepening, particularly through elements such as money supply indicators M1 and M2, plays a critical role in influencing economic growth and stability. In developing economies like Nigeria, understanding the relationship between these financial elements and Gross Domestic Product (GDP) is crucial for shaping monetary policies and ensuring sustainable economic progress. Prior studies have explored the link between financial deepening and economic performance, yet there remains limited empirical focus on how M1 and M2 directly impact GDP in Nigeria.
Despite the recognized importance of financial deepening, there is a gap in comprehensively analyzing the specific effects of M1 and M2 on Nigeria’s GDP over a long period. The challenge lies in determining the extent to which these monetary aggregates contribute to economic growth and identifying the best predictive models to analyze this relationship. This study addresses this gap by comparing linear, generalized linear, and Bayesian regression models to evaluate the impact of M1 and M2 on Nigeria’s GDP, providing a detailed analysis from 1981 to 2023.
This study contributes to literature by offering a comparative assessment of traditional and Bayesian regression approaches in modeling the relationship between financial deepening and economic growth. It provides policymakers and financial institutions with empirical insights on how money supply indicators influence GDP, informing decisions on monetary policy and economic planning. Additionally, the study adds value to academic discourse by highlighting the utility of Bayesian methods in economic modeling, particularly in the context of developing economies like Nigeria.
The aim of this study is to investigate the impact of financial deepening elements (M1 and M2) on Nigeria’s GDP from 1981 to 2023 using a Bayesian regression approach. The analysis is conducted in comparison with traditional linear regression (lm) and generalized linear models (glm) to assess model performance and the most reliable predictive framework. The methodology section details the data collection process, variable transformations, model specifications, and evaluation metrics used in this study.
The data used in this analysis is collected from Central Bank of Nigeria and covers the time period from 1981 to 2023. The key variables of interest are: - Gross Domestic Product (GDP): The dependent variable, representing Nigeria’s annual GDP (in constant local currency). - M1: A key financial deepening element, representing the money supply that includes physical currency and demand deposits. - M2: Another financial deepening element, which includes M1 plus savings deposits and other near money assets.
All financial variables (GDP, M1, and M2) are transformed into natural logarithmic form to stabilize variance and normalize the distribution of the data. This transformation allows us to interpret the regression coefficients as elasticities.
Three regression models are employed in this study: linear regression (lm), generalized linear model (glm), and Bayesian regression. The purpose is to compare their performance in estimating the effect of M1 and M2 on GDP.
The linear regression model is expressed as:
\[ \log(\text{GDP}_t) = \beta_0 + \beta_1 \log(\text{M1}_t) + \beta_2 \log(\text{M2}_t) + \epsilon_t \]
Where: - \(\log(\text{GDP}_t)\) is the log-transformed GDP for year \(t\), - \(\beta_0\) is the intercept, - \(\beta_1\) and \(\beta_2\) are the coefficients for log(M1) and log(M2), respectively, - \(\epsilon_t\) is the error term.
The generalized linear model (glm) with a Gaussian family is specified as:
\[ g(\mu_t) = \beta_0 + \beta_1 \log(\text{M1}_t) + \beta_2 \log(\text{M2}_t) \]
Where: - \(g(\mu_t)\) is the identity link function (since we are using the Gaussian distribution), - \(\mu_t\) is the expected value of the log(GDP), - \(\beta_0\), \(\beta_1\), and \(\beta_2\) are the regression coefficients.
The Bayesian regression model is fitted using Markov Chain Monte Carlo (MCMC) simulations. The model assumes a normal likelihood for the log-transformed GDP:
\[ \log(\text{GDP}_t) \sim N(\beta_0 + \beta_1 \log(\text{M1}_t) + \beta_2 \log(\text{M2}_t), \sigma^2) \]
Priors for the parameters \(\beta_0\), \(\beta_1\), and \(\beta_2\) are set as Gaussian distributions with a mean of zero and a large prior variance (1000), which reflects non-informative priors.
The performance of the models is evaluated based on: - Coefficient significance: We analyze the p-values and credible intervals for each predictor. - Model fit: For the lm and glm models, we assess the adjusted R-squared and residual standard error. For Bayesian regression, posterior estimates and credible intervals are used. - Akaike Information Criterion (AIC): The AIC is used to compare model performance, with lower AIC values indicating a better fit. - Posterior Predictive Checks: For the Bayesian model, posterior predictive checks are used to assess model adequacy.
The statistical analysis is conducted using RStudio
with the following packages: - tidyverse: for data
wrangling and estimations. - stats: For fitting linear
models (lm). - MASS: For fitting generalized linear models
(glm). - arm: For Bayesian regression (bayesglm). -
ggplot2: For data visualization, including histograms and
density plots. - coda: For analyzing MCMC diagnostics and
convergence in the Bayesian model.
From the data briefly presented, x = index number, M1, M2, and GDP are in Billion Naira, while YEAR ranges from 1981 to 2023.
## X M1 M2 GDP YEAR
## 1 1 14.47 8.57 94.33 1981
## 2 2 15.79 10.67 101.01 1982
The quantile-quantile (Q-Q) plot suggests that the M1 data does not follow normal distribution, given that the point observations deviates from the reference line.
# check normality with Q-Q plot
qqnorm(datfrm$M1, main = "Q-Q Plot for M1")
qqline(datfrm$M1, col = "red")
The histogram further buttresses the non-linear nature of the M1 observations. Particularly, it displayed a positively skewed data, the shapiro-wilk’s test also failed to satisfy the normality test (W<2=0.75, p=0.00).
# Variable of interest
M1 <- datfrm$M1
# Calculate statistics
mean_val <- mean(M1, na.rm = TRUE)
sd_val <- sd(M1, na.rm = TRUE)
skewness_val <- skewness(M1, na.rm = TRUE)
kurtosis_val <- kurtosis(M1, na.rm = TRUE)
shapiro_test <- shapiro.test(M1)
shapiro_stat <- shapiro_test$statistic
shapiro_p_val <- shapiro_test$p.value
# Plot histogram with density curve
ggplot(datfrm, aes(x = M1)) +
geom_histogram(aes(y = ..density..), color = "black", fill = "lightblue", bins = 30) +
geom_density(color = "red", size = 1) +
labs(title = "Histogram and Density Curve of M1",
x = "M1",
y = "Density") +
annotate("text", x = Inf, y = Inf, label = paste("Mean:", round(mean_val, 2)),
vjust = 2, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("SD:", round(sd_val, 2)),
vjust = 3, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Skewness:", round(skewness_val, 2)),
vjust = 4, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Kurtosis:", round(kurtosis_val, 2)),
vjust = 5, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Shapiro-Wilk:", round(shapiro_stat, 2), "\nP-value:", round(shapiro_p_val, 4)),
vjust = 6, hjust = 2, size = 4, color = "blue")
The quantile-quantile (Q-Q) plot suggests that the M2 data also did not follow normal distribution, given that the point observations deviates from the reference line.
# check normality with Q-Q plot
qqnorm(datfrm$M2, main = "Q-Q Plot for M2")
qqline(datfrm$M2, col = "red")
The histogram further illustrates the non-linear nature of the M2 observations, particularly showing positively skewed data. Additionally, the Shapiro-Wilk test failed to meet the normality assumption, with a W statistic of 0.73 and a p-value of 0.00.
# Variable of interest
M2 <- datfrm$M2
# Calculate statistics
mean_val <- mean(M2, na.rm = TRUE)
sd_val <- sd(M2, na.rm = TRUE)
skewness_val <- skewness(M2, na.rm = TRUE)
kurtosis_val <- kurtosis(M2, na.rm = TRUE)
shapiro_test <- shapiro.test(M2)
shapiro_stat <- shapiro_test$statistic
shapiro_p_val <- shapiro_test$p.value
# Plot histogram with density curve
ggplot(datfrm, aes(x = M2)) +
geom_histogram(aes(y = ..density..), color = "black", fill = "lightblue", bins = 30) +
geom_density(color = "red", size = 1) +
labs(title = "Histogram and Density Curve of M2",
x = "M2",
y = "Density") +
annotate("text", x = Inf, y = Inf, label = paste("Mean:", round(mean_val, 2)),
vjust = 2, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("SD:", round(sd_val, 2)),
vjust = 3, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Skewness:", round(skewness_val, 2)),
vjust = 4, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Kurtosis:", round(kurtosis_val, 2)),
vjust = 5, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Shapiro-Wilk:", round(shapiro_stat, 2), "\nP-value:", round(shapiro_p_val, 4)),
vjust = 6, hjust = 2, size = 4, color = "blue")
The quantile-quantile (Q-Q) plot suggests that the GDP data does not follow normal distribution, given that the point observations deviates from the reference line.
# check normality with Q-Q plot
qqnorm(datfrm$GDP, main = "Q-Q Plot for GDP")
qqline(datfrm$GDP, col = "red")
The histogram further illustrates the non-linear nature of the GDP observations, specifically displaying positively skewed data. The formal procedure using the Shapiro-Wilk test failed to meet the normality assumption, with a W statistic of 0.26 and a p-value of 0.00.
# Variable of interest
GDP <- datfrm$GDP
# Calculate statistics
mean_val <- mean(GDP, na.rm = TRUE)
sd_val <- sd(M2, na.rm = TRUE)
skewness_val <- skewness(GDP, na.rm = TRUE)
kurtosis_val <- kurtosis(GDP, na.rm = TRUE)
shapiro_test <- shapiro.test(GDP)
shapiro_stat <- shapiro_test$statistic
shapiro_p_val <- shapiro_test$p.value
# Plot histogram with density curve
ggplot(datfrm, aes(x = GDP)) +
geom_histogram(aes(y = ..density..), color = "black", fill = "lightblue", bins = 30) +
geom_density(color = "red", size = 1) +
labs(title = "Histogram and Density Curve of GDP",
x = "M2",
y = "Density") +
annotate("text", x = Inf, y = Inf, label = paste("Mean:", round(mean_val, 2)),
vjust = 2, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("SD:", round(sd_val, 2)),
vjust = 3, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Skewness:", round(skewness_val, 2)),
vjust = 4, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Kurtosis:", round(kurtosis_val, 2)),
vjust = 5, hjust = 2, size = 4, color = "blue") +
annotate("text", x = Inf, y = Inf, label = paste("Shapiro-Wilk:", round(shapiro_stat, 2), "\nP-value:", round(shapiro_p_val, 4)),
vjust = 6, hjust = 2, size = 4, color = "blue")
The graph shows a sharp increase in Nigeria’s GDP, M1, and M2 from around 2005 onwards, with M1 and M2 closely tracking each other, while GDP rises at a much steeper rate post-2020.
# Create the plot for M1 and M2 on the primary axis
plot(datfrm$YEAR, datfrm$M1, type='l', col='red', xlab="Year", ylab="M1 / M2 (₦ Billion)",
main="Nigeria's Financial Inclusion: GDP, M1, and M2 (1981-2023)")
lines(datfrm$YEAR, datfrm$M2, col='green')
# Add the secondary axis for GDP
par(new = TRUE)
plot(datfrm$YEAR, datfrm$GDP, type='l', col='blue', axes=FALSE, xlab="", ylab="", lty=1)
axis(4) # Add an axis on the right (secondary axis)
mtext("GDP (₦ Billion)", side=4, line=3) # Add the label for the secondary axis
# Add the legend
legend("topright", legend = c("GDP", "M1", "M2"), col = c("blue", "red", "green"), lty = 1)
summary(dfrm)
## M1 M2 GDP
## Min. : 14.47 Min. : 8.57 Min. : 94.3
## 1st Qu.: 93.25 1st Qu.: 49.74 1st Qu.: 710.5
## Median : 1505.96 Median : 930.49 Median : 7795.8
## Mean : 7984.74 Mean : 8507.97 Mean : 83107.5
## 3rd Qu.:14186.77 3rd Qu.:15213.80 3rd Qu.: 75704.3
## Max. :38783.91 Max. :38120.23 Max. :1958200.0
res<- cor(dfrm)
res
## M1 M2 GDP
## M1 1.0000000 0.9916479 0.5899533
## M2 0.9916479 1.0000000 0.5403569
## GDP 0.5899533 0.5403569 1.0000000
Transform the observations using natural log.
attach(dfrm)
logGDP=log(GDP)
logM1=log(M1)
logM2=log(M2)
Fitting the linear and generalized linear models.
# Linear model
fit_lm <- lm(logGDP ~ logM1 + logM2, data=dfrm)
summary(fit_lm)
##
## Call:
## lm(formula = logGDP ~ logM1 + logM2, data = dfrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.82440 -0.14530 -0.07664 0.04949 2.16786
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.04345 0.35125 5.818 8.53e-07 ***
## logM1 0.94449 0.40845 2.312 0.026 *
## logM2 0.02815 0.37827 0.074 0.941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4312 on 40 degrees of freedom
## Multiple R-squared: 0.9747, Adjusted R-squared: 0.9734
## F-statistic: 770.9 on 2 and 40 DF, p-value: < 2.2e-16
# Generalized Linear Model
fit_glm <- glm(logGDP ~ logM1 + logM2, data=dfrm, family = gaussian)
summary(fit_glm)
##
## Call:
## glm(formula = logGDP ~ logM1 + logM2, family = gaussian, data = dfrm)
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.04345 0.35125 5.818 8.53e-07 ***
## logM1 0.94449 0.40845 2.312 0.026 *
## logM2 0.02815 0.37827 0.074 0.941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for gaussian family taken to be 0.1859458)
##
## Null deviance: 294.1344 on 42 degrees of freedom
## Residual deviance: 7.4378 on 40 degrees of freedom
## AIC: 54.58
##
## Number of Fisher Scoring iterations: 2
The Bayesian regression requires the arm or MCMCpack package for bayesglm and MCMCregress functions.
# Bayesian generalized linear model (bayesglm)
model_bayesglm <- bayesglm(logGDP ~ logM1 + logM2, data=dfrm, prior.mean=0, prior.scale=1000, family=gaussian)
summary(model_bayesglm)
##
## Call:
## bayesglm(formula = logGDP ~ logM1 + logM2, family = gaussian,
## data = dfrm, prior.mean = 0, prior.scale = 1000)
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.04343 0.35125 5.818 8.53e-07 ***
## logM1 0.94449 0.40845 2.312 0.026 *
## logM2 0.02815 0.37827 0.074 0.941
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for gaussian family taken to be 0.1859458)
##
## Null deviance: 294.1344 on 42 degrees of freedom
## Residual deviance: 7.4378 on 40 degrees of freedom
## AIC: 54.58
##
## Number of Fisher Scoring iterations: 8
# MCMC Bayesian Regression
model_mcmc <- MCMCregress(logGDP ~ logM1 + logM2, data=dfrm, burnin=3000, mcmc=10000)
summary(model_mcmc)
##
## Iterations = 3001:13000
## Thinning interval = 1
## Number of chains = 1
## Sample size per chain = 10000
##
## 1. Empirical mean and standard deviation for each variable,
## plus standard error of the mean:
##
## Mean SD Naive SE Time-series SE
## (Intercept) 2.03871 0.3576 0.003576 0.0035281
## logM1 0.94627 0.4172 0.004172 0.0041724
## logM2 0.02681 0.3866 0.003866 0.0038664
## sigma2 0.19502 0.0459 0.000459 0.0004998
##
## 2. Quantiles for each variable:
##
## 2.5% 25% 50% 75% 97.5%
## (Intercept) 1.3408 1.7984 2.0365 2.2752 2.7466
## logM1 0.1277 0.6692 0.9522 1.2268 1.7554
## logM2 -0.7254 -0.2335 0.0240 0.2842 0.7824
## sigma2 0.1253 0.1621 0.1877 0.2200 0.3011
The posterior simulations and visualizations are useful, but ensure that libraries like MCMCpack are correctly installed, and the sim() function works well with the model type.
# Posterior simulation for bayesglm model
simulates <- sim(model_bayesglm, n.sims=1000)
posterior_open <- simulates@coef[,2]
hist(posterior_open)
plot(density(posterior_open), xlab="Posterior M1", main="Density of Posterior for M1")
# Posterior quantiles
quantile(posterior_open, c(.025, .975))
## 2.5% 97.5%
## 0.1103076 1.7541386
The linear regression model (lm) results indicate that M1 has a significant positive impact on GDP, with a coefficient of 0.94449 and a p-value of 0.026. This suggests that a 1% increase in M1 is associated with approximately a 94.4% increase in GDP, holding M2 constant. On the other hand, M2 is not statistically significant, with a coefficient of 0.02815 and a p-value of 0.941, indicating that changes in M2 do not substantially affect GDP in this analysis. The model demonstrates a strong fit, as reflected by the high R-squared value of 0.9747, meaning that 97.47% of the variability in GDP is explained by the model.
The generalized linear model (glm) results are virtually identical to the linear regression, with M1 being the only significant predictor of GDP. The coefficient for M1 remains at 0.94449, with the same p-value of 0.026, while M2’s impact is still negligible (p-value = 0.941). The glm model has a similar fit, with the dispersion parameter being reasonably low, and the residual deviance suggests the model fits the data well. With an AIC of 54.58, the glm model offers an alternative framework that accommodates different link functions or distributions, but here, the gaussian family replicates the linear regression approach without much deviation.
The Bayesian regression model (bayesglm) produces consistent results with the other models, affirming the significant influence of M1 on GDP (posterior mean = 0.94449) and the non-significance of M2 (posterior mean = 0.02815). The Bayesian model introduces posterior distributions, providing credible intervals that quantify uncertainty around the estimates. For M1, the 95% credible interval (0.1277 to 1.7554) confirms the strong positive relationship with GDP, while M2’s interval (-0.7254 to 0.7824) further indicates the lack of a definitive effect. Bayesian regression offers the advantage of incorporating prior knowledge and better capturing uncertainty, but in this case, its conclusions align closely with the frequentist methods.
The practical implication of this finding is that increasing the money supply in the form of M1 (cash and liquid assets) significantly boosts Nigeria’s GDP, suggesting that policies aimed at increasing liquidity could drive economic growth. However, changes in M2 (which includes savings and time deposits) do not have a notable impact on GDP, indicating that less liquid forms of money are not as effective in stimulating immediate economic activity. The high R-squared value indicates the strong explanatory power of the model, reinforcing the importance of M1 in economic growth strategies.
In comparing the models, all three approaches—lm, glm, and Bayesian regression—yield the same conclusion: M1 significantly affects GDP, while M2 does not. Given the high R-squared and similar AIC values, both frequentist models (lm and glm) perform equally well, offering simplicity and interpretability. The Bayesian model, though more robust in capturing uncertainty, does not provide additional insights in this context beyond confirming M1’s significance. Therefore, for ease of use and interpretability, the linear regression (lm) is recommended as the best-performing model in this case, with Bayesian regression as a potential alternative if further uncertainty analysis is desired.