The Phillips curve theory suggests that there is a negative relationship between unemployment rates and inflation rates. In other words, when the unemployment rate increases, the inflation rate decreases, and vice versa. However, this relationship is not universal and may vary depending on the country and its economic conditions.
When examining a chart comparing unemployment and inflation rates for G-20 countries from 1990 to 2021, some countries may exhibit a clear Phillips curve relationship, while others may not show any relationship at all. This is particularly true for countries that have experienced hyperinflation, where the relationship may be difficult to discern.
For Korea and Japan, it is apparent that there is a clear relationship between unemployment and inflation rates. However, the European Union displays an opposite relationship, where inflation and unemployment move in the same direction. In the United States, there is a weak Phillips curve relationship.
![](https://econreviews.wordpress.com/wp-content/uploads/2023/02/image-40.png?w=1024)
![](https://econreviews.wordpress.com/wp-content/uploads/2023/02/image-41.png?w=1024)
![](https://econreviews.wordpress.com/wp-content/uploads/2023/02/image-42.png?w=784)
![](https://econreviews.wordpress.com/wp-content/uploads/2023/02/image-43.png?w=784)
![](https://econreviews.wordpress.com/wp-content/uploads/2023/02/image-44.png?w=1024)
The following R-codes generate
library(wbstats)
library(tidyverse)
Set G20 country codes
g20 <- c(“ARG”, “AUS”, “BRA”, “CAN”, “CHN”, “FRA”, “DEU”, “IND”, “IDN”, “ITA”, “JPN”, “KOR”, “MEX”, “RUS”, “SAU”, “ZAF”, “TUR”, “GBR”, “USA”, “EUU”)
Download inflation rates
inflation <- wb(indicator = “FP.CPI.TOTL.ZG”, country = g20, startdate = “1990”, enddate = “2022”)
Download unemployment rates
unemployment <- wb(indicator = “SL.UEM.TOTL.ZS”, country = g20, startdate = “1990”, enddate = “2022”)
Combine the two data frames into one
data <- left_join(inflation, unemployment, by = c(“country”, “date”))
head(data)
library(ggplot2)
library(ggpubr)
Combine the inflation and unemployment data frames
df <- inflation %>%
left_join(unemployment, by = c(“country”, “date”))
Loop through each country and create a scatter plot
plots_list <- list() for (c in unique(df$country)) { df_subset <- df %>% filter(country == c)
p <- ggplot(df_subset, aes(x = value.y, y = value.x)) +
geom_point() +
labs(title = c)
plots_list[[c]] <- p
}
Display the scatter plots using ggarrange
ggarrange(plotlist = plots_list, ncol = 4, nrow = 5)
Filter the data to keep only the United States
us_data <- data %>%
filter(country == “United States”)
Create a scatter chart
ggplot(us_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = us_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in the United States”)
Filter the data to keep only Korea
korea_data <- data %>%
filter(country == “Korea, Rep.”)
Create a scatter chart
ggplot(korea_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = korea_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in Korea”)
Filter the data to keep only Korea
EU_data <- data %>%
filter(country == “European Union”)
Create a scatter chart
ggplot(EU_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = EU_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in European Union”)
data$country
Filter the data to keep only Korea
Japan_data <- data %>%
filter(country ==”Japan”)
Create a scatter chart
ggplot(Japan_data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = Japan_data$date)) +
geom_smooth(method = “lm”, se = FALSE, color = “blue”) +
labs(x = “Unemployment rate”, y = “Inflation rate”,
title = “Inflation rate vs. Unemployment rate in Japna”)
ggplot(data, aes(x = value.y, y = value.x)) +
geom_point(aes(color = country)) +
scale_x_continuous(“Unemployment Rate”, labels = scales::percent_format()) +
scale_y_continuous(“Inflation Rate”, labels = scales::percent_format()) +
theme_bw()
Filter inflation data for 2021
inflation_2021 <- inflation %>%
filter(data$date == 2021)
unemployment_2021<- unemployment %>%
filter(unemployment$date== 2021)
Calculate average inflation ra
avg_inflation_2021 <- mean(inflation_2021$value)
Create bar chart with average line and label
ggplot(inflation_2021, aes(x = country, y = value)) +
geom_bar(stat = “identity”, fill = “blue”) +
geom_hline(yintercept = avg_inflation_2021, color = “red”, linetype = “dashed”) +
geom_text(aes(x = 0, y = avg_inflation_2021, label = paste0(“Avg: “, round(avg_inflation_2021, 2), “%”)),
hjust = -5.1, vjust = -0.5, color = “red”, fontface = “bold”) +
labs(title = “Inflation Rates in G-20 Countries, 2021”,
x = “Country”,
y = “Inflation Rate (%)”) +
theme_bw() +
theme(plot.title = element_text(size = 14, face = “bold”),
axis.text.x = element_text(angle = 45, vjust = 0.5))