The data set I chose is U.S.Unemployment Rates. I’m going to analyze the unemployment rates of women between 2019 and 2023. It provides valuable insights into the economic status of women and helps understand the recovery from COVID-19 pandemic.
# Load the dataset
df <- read.csv("C:\\Users\\yinan\\downloads\\us_unemployment_rates.csv")
head(df)
## date overall_rate men_rate women_rate men_16_17_rate women_16_17_rate
## 1 1948-01-01 3.4 3.4 3.3 9.7 8.8
## 2 1948-02-01 3.8 3.6 4.5 13.0 13.2
## 3 1948-03-01 4.0 3.8 4.4 14.0 11.4
## 4 1948-04-01 3.9 3.8 4.3 11.6 10.6
## 5 1948-05-01 3.5 3.5 3.7 7.1 5.4
## 6 1948-06-01 3.6 3.3 4.3 11.3 12.9
## men_16_19_rate women_16_19_rate men_18_19_rate women_18_19_rate
## 1 9.4 7.2 9.5 6.8
## 2 10.8 8.9 9.2 6.8
## 3 11.9 8.6 10.3 7.3
## 4 9.8 9.2 8.6 8.6
## 5 7.6 6.1 8.6 7.0
## 6 9.3 9.3 7.4 6.8
## men_16_24_rate women_16_24_rate men_20_24_rate women_20_24_rate
## 1 8.0 4.9 7.2 3.4
## 2 8.6 6.3 7.4 4.5
## 3 10.0 6.7 9.0 5.4
## 4 8.6 6.7 7.9 5.0
## 5 7.6 5.4 7.6 4.9
## 6 7.8 6.5 6.9 4.6
## men_25plus_rate women_25plus_rate men_25_34_rate women_25_34_rate
## 1 2.5 2.7 2.6 4.3
## 2 2.6 3.7 2.7 5.1
## 3 2.6 3.2 2.7 3.5
## 4 2.8 3.5 3.2 3.8
## 5 2.7 3.1 2.9 3.3
## 6 2.4 3.5 2.5 4.2
## men_25_54_rate women_25_54_rate men_35_44_rate women_35_44_rate
## 1 2.3 2.8 2.1 1.8
## 2 2.6 3.7 2.5 2.6
## 3 2.6 3.3 2.6 3.0
## 4 2.8 3.5 2.7 3.5
## 5 2.5 3.1 2.4 3.0
## 6 2.3 3.6 2.3 3.3
## men_45_54_rate women_45_54_rate men_55plus_rate women_55plus_rate
## 1 2.3 2.1 3.0 NA
## 2 2.6 3.3 2.9 NA
## 3 2.4 3.3 2.8 NA
## 4 2.5 3.1 2.9 NA
## 5 2.3 2.9 3.1 NA
## 6 2.2 3.1 2.8 NA
# Convert 'date' column to Date type and filter for 2019 to 2023
df$date <- as.Date(df$date)
filtered_df <- subset(df, date >= as.Date("2019-01-01") & date <= as.Date("2023-12-31"))
# Select only women's unemployment rates
women_unemployment_df <- data.frame(date=filtered_df$date, women_rate=filtered_df$women_rate)
women_ts <- ts(women_unemployment_df$women_rate, start=c(2019, 1), frequency=12)
additive_decomp <- decompose(women_ts, type = "additive")
plot(additive_decomp)
multi_decomp <- decompose(women_ts, type = "multiplicative")
plot(multi_decomp)
There’s a noticeable peak around early 2020 in both plots, which likely corresponds to the COVID-19 pandemic. I noticed that there’s not much difference between the additive and multiplicative decomposition plots for this dataset. The similarity between the additive and multiplicative decompositions suggests that the seasonal effects do not dramatically change in magnitude relative to the value of the time series. This indicates that either an additive or a multiplicative model could be appropriate for capturing the seasonal variations and trend in the data for this specific case.