« 福岡県の市区町村別世帯数及び人口(2025年9月1日現在) | トップページ | 所得分布の重なりと分断――統計から見える「世代間対立」の実態 »

2026年3月16日 (月)

1つの仮説あるいはマニフェストを語るためのグラフ

日本社会の主要な格差は「世代間格差」ではなく「世代内格差」である。以下の図は、その構造を直感的に理解するためのシミュレーションである。

Screenshot-20260316-at-193757 Screenshot-20260316-at-204616

対数正規分布 (rlnorm) の採用: 年収データは通常、左側に山があり右側に長い裾を持つため、正規分布よりもこちらの方が実態に即しています。

高齢層の二極化: 70代の分布には、年金中心のボリュームゾーンと、現役世代を凌駕する所得を持つ資産家層(混合分布)を組み込んでいます。

世代間の「重なり」の強調: リッジラインプロットの透明度とスケールを調整し、20代と70代がいかに「同じ経済的状況」に置かれているかを視覚的に際立たせました。


# ----------------------------------------------------
# 1. 必要なパッケージの読み込み
# ----------------------------------------------------
library(ggplot2)
library(ggridges)
library(dplyr)

# --- AONF format configuration ---
AONF_CAPTION <- "Archives from 2026 Onward and Notes for the Future\n2026年以降の記録 | https://ab.cocolog-nifty.com/note/"

# ----------------------------------------------------
# 2. 所得分布の精緻なシミュレーションデータ生成
# 所得の実態に近い対数正規分布(rlnorm)を使用します。
# ----------------------------------------------------
set.seed(42)
n_samples <- 2000

# 現役世代 (20代): 中央値3.4M、分散は小さめ
income_20s <- data.frame(
  Generation = factor("現役世代 (20代)", levels = c("現役世代 (20代)", "現役世代 (40代)", "高齢層 (70代)")),
  Income = rlnorm(n_samples, meanlog = log(3.4), sdlog = 0.25)
)

# 現役世代 (40代): 中央値5.0M、分散が大きく高所得者も含まれる
income_40s <- data.frame(
  Generation = factor("現役世代 (40代)", levels = c("現役世代 (20代)", "現役世代 (40代)", "高齢層 (70代)")),
  Income = rlnorm(n_samples, meanlog = log(5.0), sdlog = 0.35)
)

# 高齢層 (70代): 二極化を表現 (85%が年金中心、15%が資産・高所得層)
income_70s_base <- rlnorm(n_samples * 0.85, meanlog = log(2.6), sdlog = 0.3)
income_70s_rich <- rlnorm(n_samples * 0.15, meanlog = log(8.5), sdlog = 0.4)
income_70s <- data.frame(
  Generation = factor("高齢層 (70代)", levels = c("現役世代 (20代)", "現役世代 (40代)", "高齢層 (70代)")),
  Income = c(income_70s_base, income_70s_rich)
)

# 全データの結合
simulated_data_refined <- bind_rows(income_20s, income_40s, income_70s)

# ----------------------------------------------------
# 3. リッジラインプロットの作成
# ----------------------------------------------------
ggplot(simulated_data_refined, aes(x = Income, y = Generation, fill = Generation)) +
  # リッジラインプロット: 重なりと密度を表現
  geom_density_ridges(
    alpha = 0.6,
    scale = 2.5,
    rel_min_height = 0.005,
    quantile_lines = TRUE, quantiles = 2 # 中央値を線で表示
  ) +
  # 軸とラベルの設定
  scale_x_continuous(
    limits = c(0, 15),
    breaks = seq(0, 15, by = 2.5),
    expand = c(0.01, 0)
  ) +
  scale_fill_manual(values = c(
    "現役世代 (20代)" = "#1f77b4",
    "現役世代 (40代)" = "#ff7f0e",
    "高齢層 (70代)" = "#2ca02c"
  )) +
  labs(
    title = "所得分布のシミュレーション(対数正規分布モデル)",
    subtitle = "各世代内の所得格差と、世代間で大きく重複する『生活実態』の可視化",
    x = "年収 (百万円)",
    y = "世代区分",
    caption = AONF_CAPTION
  ) +
  # AONF形式のテーマ適用
  theme_minimal(base_family = "HiraKakuProN-W3") +
  theme(
    legend.position = "none",
    plot.title = element_text(size = 14, face = "bold"),
    plot.subtitle = element_text(size = 10, color = "gray20"),
    plot.caption = element_text(size = 8, hjust = 1, color = "gray30", lineheight = 1.2),
    axis.title = element_text(size = 10),
    panel.grid.minor = element_blank()
  )

|

« 福岡県の市区町村別世帯数及び人口(2025年9月1日現在) | トップページ | 所得分布の重なりと分断――統計から見える「世代間対立」の実態 »

「分析メモ」カテゴリの記事