UPDATE: 2024-01-22 12:47:29.17065
このノートは「ベイズ統計」に関する何らかの内容をまとめ、ベイズ統計への理解を深めていくために作成している。今回は下記のブログに記載されているテニス選手の強さを推定する内容を参考にさせていただき、写経しながら、ところどころ自分用の補足をメモすることで、自分用の補足資料になることを目指す。私の解釈がおかしく、メモが誤っている場合があるので注意。
今回は下記の記事を部分的に再現してみた。記事とKernelは、Pythonで書かれているため、Rで書き直している。
Association
of Tennis Professionals
Matchesのデータを使用。1試合ごとに試合の詳細が記録されている(53508×48)。元のデータにはyear
カラムがなく、データ抽出時点にtourney_date
から作成している。
library(tidyverse)
library(rstan)
#library(brms)
#library(bayesplot)
library(patchwork)
options(max.print = 999999)
rstan_options(auto_write=TRUE)
options(mc.cores=parallel::detectCores())
PATH <- '~/Desktop/df_matches.csv'
df_matches_mst <- read.csv(PATH) %>% select(-X)
head(df_matches_mst, 10)
## tourney_id tourney_name surface draw_size tourney_level match_num winner_id
## 1 2000-717 Orlando Clay 32 A 1 102179
## 2 2000-717 Orlando Clay 32 A 2 103602
## 3 2000-717 Orlando Clay 32 A 3 103387
## 4 2000-717 Orlando Clay 32 A 4 101733
## 5 2000-717 Orlando Clay 32 A 5 101727
## 6 2000-717 Orlando Clay 32 A 6 103181
## 7 2000-717 Orlando Clay 32 A 7 101675
## 8 2000-717 Orlando Clay 32 A 8 102834
## 9 2000-717 Orlando Clay 32 A 9 103454
## 10 2000-717 Orlando Clay 32 A 10 102466
## winner_seed winner_entry winner_name winner_hand winner_ht
## 1 NA Antony Dupuis R 185
## 2 NA Q Fernando Gonzalez R 183
## 3 NA Paradorn Srichaphan R 185
## 4 NA Jan Siemerink L 183
## 5 4 Jason Stoltenberg R 185
## 6 NA Jiri Vanek R 185
## 7 NA Martin Rodriguez R 178
## 8 5 Paul Goldstein R 178
## 9 6 Nicolas Massu R 183
## 10 NA Jan Kroslak R 188
## winner_ioc winner_age winner_rank winner_rank_points loser_id loser_seed
## 1 FRA 27.18138 113 351 102776 1
## 2 CHI 19.75633 352 76 102821 NA
## 3 THA 20.88159 103 380 102205 NA
## 4 NED 30.04791 107 371 102925 8
## 5 AUS 30.07529 74 543 101826 NA
## 6 CZE 22.02053 92 429 101885 NA
## 7 ARG 30.36824 120 322 102455 NA
## 8 USA 23.73990 79 516 101086 NA
## 9 CHI 20.55852 89 464 102133 NA
## 10 SVK 25.53867 125 315 102966 NA
## loser_entry loser_name loser_hand loser_ht loser_ioc loser_age
## 1 Andrew Ilie R 180 AUS 24.03559
## 2 WC Cecil Mamiit R 173 PHI 23.84394
## 3 Sebastien Lareau R 183 CAN 27.01164
## 4 Justin Gimelstob R 196 USA 23.26078
## 5 Alex Lopez Moron R 175 ESP 29.42368
## 6 Wayne Arthurs L 190 AUS 29.12252
## 7 Lorenzo Manta R 190 SUI 25.62355
## 8 Ronald Agenor R 180 USA 35.46338
## 9 Laurence Tieleman R 180 ITA 27.46064
## 10 Fredrik Jonsson R 193 SWE 23.09377
## loser_rank loser_rank_points score best_of round minutes
## 1 50 762 3-6 7-6(6) 7-6(4) 3 R32 162
## 2 139 280 6-2 7-5 3 R32 86
## 3 133 293 6-1 6-3 3 R32 64
## 4 95 408 4-6 6-2 7-5 3 R32 150
## 5 111 357 6-1 6-4 3 R32 60
## 6 102 381 6-7(2) 6-4 6-3 3 R32 115
## 7 112 356 6-7(7) 7-6(2) 7-6(3) 3 R32 171
## 8 91 430 6-2 6-1 3 R32 66
## 9 97 404 6-2 6-3 3 R32 63
## 10 117 342 6-1 3-6 7-6(4) 3 R32 123
## w_ace w_df w_svpt w_1stIn w_1stWon w_2ndWon w_SvGms w_bpSaved w_bpFaced
## 1 8 1 126 76 56 29 16 14 15
## 2 4 2 67 35 25 16 10 4 6
## 3 4 1 46 29 23 11 8 0 0
## 4 8 6 109 56 43 21 15 9 12
## 5 3 0 50 27 22 16 9 1 1
## 6 9 4 95 60 43 26 16 5 6
## 7 4 11 148 65 54 43 18 9 12
## 8 1 1 42 23 19 13 8 0 0
## 9 2 2 49 30 26 10 9 3 4
## 10 7 2 83 55 42 14 14 3 6
## l_ace l_df l_svpt l_1stIn l_1stWon l_2ndWon l_SvGms l_bpSaved l_bpFaced year
## 1 13 4 110 59 49 31 17 4 4 2000
## 2 0 0 57 24 13 17 10 4 9 2000
## 3 2 2 65 39 22 10 8 6 10 2000
## 4 4 6 104 57 35 24 15 6 11 2000
## 5 0 3 47 28 17 10 8 3 6 2000
## 6 11 8 94 48 31 29 15 6 9 2000
## 7 5 5 126 70 45 36 18 3 6 2000
## 8 0 0 42 25 9 10 7 3 7 2000
## 9 2 3 47 25 13 10 8 3 7 2000
## 10 3 2 102 62 43 14 14 9 13 2000
このデータを利用して、選手の強さを推定する。その後、モデルを発展させて時系列で選手の強さを推定する。
StanとRでベイズ統計モデリングのp189を参考にモデルを作成する。
モデルのメカニズムを考える。各選手の強さを\(\mu[n]\)、勝負ムラを\(\sigma_{pf}[n]\)として、1回の勝負で発揮する力は、平均\(\mu[n]\)、標準偏差\(\sigma_{pf}[n]\)の正規分布から生成されると考える。勝敗はそのパフォーマンスの大小で決まる。
階層モデルを適用し、「各選手の強さは\(\mu[n]\)は特定の分布に従う」という仮定をたてる。つまり、各選手の強さ\(\mu[n]\)は平均0、標準偏差\(\sigma_{\mu}\)に従うと考える。そして、勝負ムラ\(\sigma_{pf}[n]\)には弱情報事前分布(ガンマ分布(10,10))を利用する。勝負ムラの大きさは1前後に固定され、パフォーマンスのスケールが決まる。正の値をとって、正規分布のような形をしてほしいという事前情報を与えたい場合にガンマ分布(10,10)が役立つ。
\[ \begin{eqnarray} performance[g,1] &\sim& Normal(\mu[Loser[g] ],\sigma_{pf}[Loser[g] ]) &\quad g=1...G \\ performance[g,2] &\sim& Normal(\mu[Winner[g]],\sigma_{pf}[Winner[g]]) &\quad g=1...G \\ performance[g,1] &\lt& performance[g,2] &\quad g=1...G \\ \mu[n] &\sim& Normal(0, \sigma_{\mu}) &\quad n=1...N \\ \sigma_{pf}[n] &\sim& Gamma(10, 10) &\quad n=1...N \\ \end{eqnarray} \]
メカニズムに関して、こちらのQiitaの記事でわかりやすく説明されている図があったのでお借りする。各選手の強さ\(\mu[n]\)は平均0、標準偏差\(\sigma_{\mu}\)に従う。標準偏差\(\sigma_{\mu}\)が小さければ、選手の強さは均衡し、大きければ選手の強さは均衡しなくなる。プロ選手であるため、この標準偏差\(\sigma_{\mu}\)はある程度狭いことが想定できる。
2000年から2017年までの試合記録があるので、まずは直近2015年からのデータを使用する。
df_matches_mst %>%
summarise(
min_year = min(year),
max_year = max(year)
)
## min_year max_year
## 1 2000 2017
選手については、下記の4選手を対象にします。参考先の記事では18選手を対象にしている。
START_YEAR <- 2015
TARGET_PLAYERS <- c('Roger Federer', 'Rafael Nadal', 'Novak Djokovic', 'Andy Murray')
期間と選手に関して、データを限定する(37×3)。
df_matches <- df_matches_mst %>%
select(year, loser_name, winner_name) %>%
filter(year >= START_YEAR) %>%
filter(winner_name %in% TARGET_PLAYERS & loser_name %in% TARGET_PLAYERS)
head(df_matches, 10)
## year loser_name winner_name
## 1 2015 Andy Murray Roger Federer
## 2 2015 Novak Djokovic Roger Federer
## 3 2015 Andy Murray Novak Djokovic
## 4 2015 Andy Murray Novak Djokovic
## 5 2015 Andy Murray Roger Federer
## 6 2015 Roger Federer Novak Djokovic
## 7 2015 Novak Djokovic Andy Murray
## 8 2015 Andy Murray Novak Djokovic
## 9 2015 Roger Federer Novak Djokovic
## 10 2015 Andy Murray Novak Djokovic
モデルで強さを推定する前に簡易集計して勝率を可視化する。ジョコビッチ選手、フェデラー選手、マレー選手、ナダル選手の順に勝率が高く、ジョコビッチ選手の勝率は80%にもなる。
tmp <- df_matches %>%
pivot_longer(cols = -year, names_to = 'flag', values_to = 'name') %>%
group_by(name) %>%
count() %>%
left_join(
x = .,
y = df_matches %>% group_by(winner_name) %>% count(),
by = join_by('name' == 'winner_name')
) %>%
rename(
games = n.x,
cnt_win = n.y
) %>%
mutate(
rate_win = cnt_win/games
)
a <- ggplot(tmp, aes(name, games)) + geom_bar(stat = 'identity') +
theme_bw(base_size = 10) + labs(x = 'player', title = 'Number of Games')
b <- ggplot(tmp, aes(name, rate_win)) + geom_bar(stat = 'identity') +
theme_bw(base_size = 10) + labs(x = 'player', title = 'Rate of win')
a | b
Stanにデータを渡す際に、扱いやすくするために負け選手インデックス、勝ち選手インデックスに変換する。ここでは簡単に選手マスタを作成し、
df_name2no <- tibble(
id = 1:length(TARGET_PLAYERS),
name = TARGET_PLAYERS
)
df_name2no
## # A tibble: 4 × 2
## id name
## <int> <chr>
## 1 1 Roger Federer
## 2 2 Rafael Nadal
## 3 3 Novak Djokovic
## 4 4 Andy Murray
試合データに紐付けることで、選手名をインデックスを変換した。
df_matches <- df_matches %>%
left_join(
df_name2no %>% rename(winner = id),
by = join_by('winner_name' == 'name')
) %>%
left_join(
df_name2no %>% rename(loser = id),
by = join_by('loser_name' == 'name')
) %>%
select(year, loser, winner)
head(df_matches, 10)
## year loser winner
## 1 2015 4 1
## 2 2015 3 1
## 3 2015 4 3
## 4 2015 4 3
## 5 2015 4 1
## 6 2015 1 3
## 7 2015 3 4
## 8 2015 4 3
## 9 2015 1 3
## 10 2015 4 3
選手の強さを推定するにあたり、必要なカラムを取り出しておく。
data <- list(
N = length(TARGET_PLAYERS),
G = nrow(df_matches),
LW = df_matches %>% select(-year)
)
data
## $N
## [1] 4
##
## $G
## [1] 37
##
## $LW
## loser winner
## 1 4 1
## 2 3 1
## 3 4 3
## 4 4 3
## 5 4 1
## 6 1 3
## 7 3 4
## 8 4 3
## 9 1 3
## 10 4 3
## 11 3 1
## 12 1 3
## 13 4 3
## 14 2 4
## 15 1 3
## 16 2 3
## 17 2 3
## 18 2 1
## 19 2 3
## 20 4 3
## 21 3 1
## 22 4 2
## 23 2 3
## 24 1 3
## 25 2 3
## 26 1 3
## 27 4 3
## 28 2 3
## 29 4 2
## 30 4 3
## 31 2 4
## 32 3 4
## 33 2 3
## 34 4 3
## 35 3 4
## 36 4 3
## 37 2 1
ここでは、stan_model()
関数で最初にコンパイルしておいてから、
model <- stan_model('model.stan')
sampling()
関数でサンプリングする。
fit <- sampling(object = model, data = data, seed = 1989)
推定結果を確認する。Rhatも1前後で収束に問題はなさそうである。
print(fit, prob = c(0.025, 0.5, 0.975), digits_summary = 2)
## Inference for Stan model: anon_model.
## 4 chains, each with iter=2000; warmup=1000; thin=1;
## post-warmup draws per chain=1000, total post-warmup draws=4000.
##
## mean se_mean sd 2.5% 50% 97.5% n_eff Rhat
## performance[1,1] 0.85 0.08 1.40 -1.73 0.74 4.01 326 1.00
## performance[1,2] 2.58 0.09 1.47 0.06 2.48 5.81 289 1.01
## performance[2,1] 1.93 0.09 1.50 -0.77 1.82 5.13 257 1.01
## performance[2,2] 2.99 0.09 1.51 0.37 2.85 6.31 279 1.01
## performance[3,1] 0.99 0.08 1.45 -1.73 0.89 4.12 354 1.00
## performance[3,2] 2.99 0.09 1.59 0.35 2.80 6.60 302 1.00
## performance[4,1] 0.96 0.08 1.44 -1.73 0.83 4.09 357 1.01
## performance[4,2] 2.95 0.09 1.54 0.32 2.77 6.40 325 1.01
## performance[5,1] 0.87 0.08 1.44 -1.84 0.79 4.11 324 1.01
## performance[5,2] 2.64 0.09 1.51 0.11 2.49 6.02 285 1.01
## performance[6,1] 1.90 0.10 1.55 -1.04 1.83 5.16 252 1.01
## performance[6,2] 3.25 0.09 1.59 0.52 3.12 6.79 299 1.01
## performance[7,1] 1.60 0.10 1.46 -1.06 1.47 4.66 234 1.01
## performance[7,2] 2.45 0.09 1.47 0.05 2.28 5.65 250 1.01
## performance[8,1] 1.03 0.08 1.44 -1.61 0.90 4.08 325 1.00
## performance[8,2] 2.97 0.09 1.56 0.41 2.81 6.41 285 1.01
## performance[9,1] 1.87 0.09 1.55 -0.96 1.74 5.07 271 1.01
## performance[9,2] 3.23 0.09 1.56 0.61 3.10 6.65 326 1.01
## performance[10,1] 0.91 0.09 1.46 -1.84 0.83 4.00 288 1.01
## performance[10,2] 2.99 0.09 1.57 0.35 2.83 6.46 331 1.01
## performance[11,1] 1.92 0.10 1.50 -0.83 1.80 5.14 233 1.01
## performance[11,2] 2.99 0.09 1.49 0.45 2.85 6.15 258 1.01
## performance[12,1] 1.88 0.09 1.54 -1.02 1.78 5.10 270 1.01
## performance[12,2] 3.27 0.09 1.59 0.61 3.12 6.86 281 1.01
## performance[13,1] 1.02 0.09 1.50 -1.75 0.88 4.52 276 1.00
## performance[13,2] 3.01 0.09 1.60 0.46 2.83 6.64 303 1.01
## performance[14,1] 0.41 0.07 1.21 -1.79 0.30 3.07 328 1.00
## performance[14,2] 1.82 0.08 1.41 -0.36 1.59 5.12 300 1.00
## performance[15,1] 1.87 0.09 1.53 -0.90 1.76 4.97 277 1.01
## performance[15,2] 3.24 0.09 1.57 0.64 3.09 6.79 292 1.01
## performance[16,1] 0.68 0.07 1.27 -1.65 0.56 3.48 329 1.01
## performance[16,2] 2.88 0.08 1.52 0.33 2.72 6.07 358 1.01
## performance[17,1] 0.68 0.06 1.23 -1.61 0.58 3.29 423 1.00
## performance[17,2] 2.95 0.09 1.57 0.38 2.76 6.61 283 1.01
## performance[18,1] 0.61 0.08 1.31 -1.67 0.48 3.44 302 1.01
## performance[18,2] 2.59 0.09 1.55 0.02 2.43 6.00 297 1.01
## performance[19,1] 0.69 0.06 1.23 -1.52 0.58 3.46 397 1.00
## performance[19,2] 2.93 0.09 1.56 0.29 2.78 6.45 325 1.01
## performance[20,1] 0.97 0.07 1.43 -1.75 0.88 3.98 365 1.00
## performance[20,2] 2.98 0.09 1.55 0.47 2.82 6.57 304 1.01
## performance[21,1] 1.95 0.09 1.48 -0.72 1.84 4.97 252 1.01
## performance[21,2] 3.01 0.09 1.49 0.48 2.87 6.37 249 1.01
## performance[22,1] 0.38 0.07 1.28 -2.13 0.31 3.09 386 1.00
## performance[22,2] 1.49 0.06 1.20 -0.42 1.33 4.29 361 1.00
## performance[23,1] 0.71 0.07 1.27 -1.66 0.63 3.46 362 1.00
## performance[23,2] 2.93 0.09 1.54 0.38 2.75 6.35 313 1.01
## performance[24,1] 1.89 0.09 1.55 -0.90 1.77 5.13 268 1.01
## performance[24,2] 3.26 0.09 1.60 0.62 3.07 6.89 296 1.01
## performance[25,1] 0.67 0.07 1.25 -1.60 0.55 3.35 346 1.00
## performance[25,2] 2.95 0.10 1.61 0.35 2.75 6.66 270 1.01
## performance[26,1] 1.87 0.10 1.54 -0.98 1.75 5.17 248 1.01
## performance[26,2] 3.27 0.09 1.60 0.59 3.11 6.84 334 1.00
## performance[27,1] 0.94 0.07 1.41 -1.64 0.84 4.09 397 1.00
## performance[27,2] 3.01 0.09 1.59 0.34 2.80 6.66 296 1.01
## performance[28,1] 0.68 0.07 1.24 -1.60 0.60 3.40 331 1.01
## performance[28,2] 2.94 0.09 1.60 0.40 2.76 6.57 314 1.01
## performance[29,1] 0.35 0.07 1.23 -1.99 0.28 3.06 355 1.01
## performance[29,2] 1.45 0.06 1.18 -0.47 1.28 4.06 331 1.00
## performance[30,1] 0.96 0.08 1.46 -1.59 0.86 4.16 337 1.00
## performance[30,2] 2.97 0.09 1.56 0.39 2.82 6.49 309 1.01
## performance[31,1] 0.45 0.07 1.22 -1.79 0.33 3.20 301 1.01
## performance[31,2] 1.85 0.08 1.36 -0.26 1.63 4.98 297 1.00
## performance[32,1] 1.66 0.10 1.50 -0.97 1.51 5.05 222 1.01
## performance[32,2] 2.50 0.10 1.51 0.07 2.27 5.89 214 1.01
## performance[33,1] 0.66 0.07 1.27 -1.59 0.54 3.44 315 1.01
## performance[33,2] 2.92 0.08 1.55 0.38 2.73 6.45 337 1.01
## performance[34,1] 0.96 0.08 1.44 -1.67 0.87 4.00 331 1.01
## performance[34,2] 2.97 0.09 1.55 0.43 2.80 6.27 309 1.01
## performance[35,1] 1.60 0.09 1.44 -0.90 1.46 4.58 260 1.01
## performance[35,2] 2.46 0.09 1.47 0.13 2.24 5.71 252 1.01
## performance[36,1] 0.97 0.07 1.42 -1.71 0.88 4.06 366 1.00
## performance[36,2] 2.98 0.08 1.55 0.41 2.80 6.47 345 1.01
## performance[37,1] 0.64 0.07 1.24 -1.66 0.52 3.30 346 1.00
## performance[37,2] 2.58 0.09 1.51 0.12 2.38 5.97 274 1.01
## mu[1] 2.32 0.09 1.29 0.27 2.14 5.21 193 1.01
## mu[2] 0.84 0.06 0.84 0.02 0.56 3.07 192 1.01
## mu[3] 2.75 0.09 1.24 0.81 2.57 5.72 185 1.01
## mu[4] 1.24 0.07 1.02 0.04 0.98 3.75 188 1.01
## s_mu 3.14 0.12 2.96 0.56 2.41 9.92 564 1.01
## s_pf[1] 0.98 0.01 0.31 0.47 0.95 1.66 1028 1.00
## s_pf[2] 0.95 0.01 0.29 0.47 0.92 1.59 1170 1.00
## s_pf[3] 1.06 0.01 0.33 0.51 1.03 1.80 1019 1.00
## s_pf[4] 1.12 0.01 0.34 0.53 1.09 1.82 706 1.01
## lp__ -78.85 0.40 10.15 -100.16 -78.40 -60.01 639 1.00
##
## Samples were drawn using NUTS(diag_e) at Mon Jan 22 12:47:34 2024.
## For each parameter, n_eff is a crude measure of effective sample size,
## and Rhat is the potential scale reduction factor on split chains (at
## convergence, Rhat=1).
各選手の強さ\(\mu\)の事後分布、勝負ムラ\(\sigma_{pf}\)の事後分布を可視化する。参考先の記事とは対象にしている選手が異なるので、推定結果に関しては違いがあるので注意。
ここでは、ジョコビッチ選手が1番強いと推定されたが、この4選手だけで言えば、フェデラー選手も同じくらい強いと推定されている。勝負ムラ\(\sigma_{pf}\)については、特に選手間で違いがなさそうである。
# 1 Roger Federer
# 2 Rafael Nadal
# 3 Novak Djokovic
# 4 Andy Murray
a <- stan_plot(
fit,
pars = c('mu'),
show_density = TRUE,
ci_level = 0.8,
outer_level = 1
)
b <- stan_plot(
fit,
pars = c('s_pf'),
show_density = TRUE,
ci_level = 0.8,
outer_level = 1
)
a | b
時系列モデルでは、各選手の\(y\)年度の強さを\(\mu[n][y]\)、勝負ムラを\(\sigma_{pf}[n][y]\)とし、\(y\)年度に行われる勝負で発揮するパフォーマンスは、平均\(\mu[n][y]\)、標準偏差\(\sigma_{pf}[n][y]\)の正規分布から生成されると考える。試合の結果はパフォーマンスの大小で決まる。時系列モデルの特徴として、各選手のある年度での強さ\(\mu[n][y]\)は、その1つ前の年度の強さ\(\mu[n][y-1]\)から生成されると考える。つまり、去年強かったら、今年も強いだろうし、来年もその強さは引き継がれるだろうと仮定する。
$$ \[\begin{eqnarray} performance[y][g,1] &\sim& Normal(\mu[Loser][y],\sigma_{pf}[Loser][y]) &\quad g=1...G,y=1...Y \\ performance[y][g,2] &\sim& Normal(\mu[Winner][y],\sigma_{pf}[Winner][y]) &\quad g=1...G,y=1...Y \\ performance[y][g,1] &\lt& performance[y][g,2] &\quad g=1...G,y=1...Y \\ \mu[n][1] &\sim& Normal(0, \sigma_{\mu}[n][1]) &\quad n=1...N\\ \mu[n][y] &\sim& Normal(\mu[n][y-1], \sigma_{\mu}[n][y-1]) &\quad n=1...N,y=2...Y \\ \sigma_{pf}[n][y] &\sim& Gamma(10, 10) &\quad n=1...N,y=1...Y \\ \sigma_{\mu}[n][y] &\sim& Normal(0, 1) &\quad n=1...N,y=1...Y \\ \end{eqnarray}\] $$
Stanのモデルは下記の通りである。
data {
int N;
int G;
int Y;
int<lower=1> GY[G];
int<lower=1, upper=N> LW[G, 2];
}
parameters {
ordered[2] performance[G];
matrix<lower=0>[N, Y] mu;
matrix<lower=0>[N, Y] s_mu;
matrix<lower=0>[N, Y] s_pf;
}
model {
for (g in 1:G)
for (i in 1:2)
performance[g, i] ~ normal(mu[ LW[g, i], GY[g] ], s_pf[ LW[g, i], GY[g] ]);
// 各選手の初年度の強さは平均0、標準偏差$\sigma_{\mu}[n][1]$の半正規分布に従う
for (n in 1:N)
mu[n, 1] ~ normal(0, s_mu[n, 1]);
for (n in 1:N)
for (y in 2:Y)
mu[n, y] ~ normal(mu[n, y-1], s_mu[n, y]);
// 各選手の年度別の強さの変化具合$\sigma_\mu[n][y]$は半正規分布に従う
for (n in 1:N)
s_mu[n] ~ normal(0, 1);
for (n in 1:N)
s_pf[n] ~ gamma(10, 10);
}
推定に使用する期間は2005年から2016年のデータとして、選手は先程と同じく4選手のみとする(213×3)。
START_YEAR <- 2005
END_YEAR <- 2016
df_matches_ts <- df_matches_mst %>%
select(year, loser_name, winner_name) %>%
filter(year >= START_YEAR & END_YEAR >= year) %>%
filter(winner_name %in% TARGET_PLAYERS & loser_name %in% TARGET_PLAYERS)
head(df_matches_ts, 10)
## year loser_name winner_name
## 1 2005 Roger Federer Rafael Nadal
## 2 2005 Rafael Nadal Roger Federer
## 3 2005 Andy Murray Roger Federer
## 4 2006 Novak Djokovic Rafael Nadal
## 5 2006 Roger Federer Rafael Nadal
## 6 2006 Rafael Nadal Roger Federer
## 7 2006 Roger Federer Rafael Nadal
## 8 2006 Andy Murray Novak Djokovic
## 9 2006 Roger Federer Andy Murray
## 10 2006 Novak Djokovic Roger Federer
推定する前に各選手の勝率の推移を可視化しておく。ジョコビッチ選手の勝率推移は上昇傾向、ナダル選手とフェデラー選手は下降傾向、マレー選手は停滞しているように見える。
tmp_ts <- df_matches_ts %>%
pivot_longer(cols = -year, names_to = 'flag', values_to = 'name') %>%
group_by(name, year) %>%
count() %>%
left_join(
x = .,
y = df_matches_ts %>% group_by(winner_name, year) %>% count(),
by = join_by('name' == 'winner_name', 'year' == 'year')
) %>%
rename(
games = n.x,
cnt_win = n.y
) %>%
mutate(
cnt_win = if_else(is.na(cnt_win) == TRUE, 0, cnt_win),
rate_win = cnt_win/games
)
a <- ggplot(tmp_ts, aes(year, games)) +
geom_line(stat = 'identity') +
scale_x_continuous(breaks = seq(2005, 2016, 1)) +
facet_wrap( ~ name, nrow = 1) +
theme_bw(base_size = 10) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = 'player', title = 'Number of Games')
b <- ggplot(tmp_ts, aes(year, rate_win)) +
geom_line(stat = 'identity') +
scale_x_continuous(breaks = seq(2005, 2016, 1)) +
facet_wrap( ~ name, nrow = 1) +
theme_bw(base_size = 10) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x = 'player', title = 'Rate of win')
a / b
先程と同じく、インデックスに変換しておく(213×3)。
df_matches_ts <- df_matches_ts %>%
left_join(
df_name2no %>% rename(winner = id),
by = join_by('winner_name' == 'name')
) %>%
left_join(
df_name2no %>% rename(loser = id),
by = join_by('loser_name' == 'name')
) %>%
# yearを1始まりに修正
mutate(year = year - (START_YEAR-1)) %>%
select(year, loser, winner)
df_matches_ts
## year loser winner
## 1 1 1 2
## 2 1 2 1
## 3 1 4 1
## 4 2 3 2
## 5 2 1 2
## 6 2 2 1
## 7 2 1 2
## 8 2 4 3
## 9 2 1 4
## 10 2 3 1
## 11 2 1 2
## 12 2 1 2
## 13 2 2 1
## 14 2 3 1
## 15 3 3 1
## 16 3 3 2
## 17 3 1 2
## 18 3 4 2
## 19 3 1 2
## 20 3 2 1
## 21 3 3 2
## 22 3 2 3
## 23 3 1 3
## 24 3 3 1
## 25 3 3 2
## 26 3 2 1
## 27 3 3 1
## 28 3 4 2
## 29 3 4 3
## 30 3 3 2
## 31 3 2 3
## 32 3 4 3
## 33 3 3 2
## 34 3 2 1
## 35 4 3 2
## 36 4 1 4
## 37 4 4 2
## 38 4 1 2
## 39 4 2 3
## 40 4 3 4
## 41 4 3 4
## 42 4 4 2
## 43 4 3 2
## 44 4 3 2
## 45 4 1 2
## 46 4 4 2
## 47 4 3 2
## 48 4 1 2
## 49 4 4 3
## 50 4 3 1
## 51 4 1 2
## 52 4 1 3
## 53 4 1 4
## 54 4 2 4
## 55 4 3 1
## 56 4 4 1
## 57 4 2 3
## 58 4 1 4
## 59 5 1 3
## 60 5 1 3
## 61 5 3 4
## 62 5 4 2
## 63 5 3 2
## 64 5 1 4
## 65 5 4 2
## 66 5 2 4
## 67 5 3 1
## 68 5 3 2
## 69 5 2 1
## 70 5 2 3
## 71 5 1 4
## 72 5 1 3
## 73 5 3 2
## 74 5 1 2
## 75 5 4 1
## 76 5 2 3
## 77 5 3 1
## 78 5 4 1
## 79 5 2 3
## 80 5 3 2
## 81 6 1 2
## 82 6 4 2
## 83 6 1 3
## 84 6 3 2
## 85 6 3 1
## 86 6 1 4
## 87 6 2 4
## 88 6 4 1
## 89 6 2 4
## 90 6 3 1
## 91 6 1 4
## 92 6 3 1
## 93 6 4 1
## 94 6 3 1
## 95 6 2 1
## 96 6 4 2
## 97 6 3 2
## 98 7 1 3
## 99 7 4 2
## 100 7 2 3
## 101 7 1 3
## 102 7 4 3
## 103 7 3 4
## 104 7 1 3
## 105 7 4 2
## 106 7 2 3
## 107 7 4 2
## 108 7 4 3
## 109 7 2 3
## 110 7 2 4
## 111 7 1 2
## 112 7 2 3
## 113 7 1 3
## 114 7 2 3
## 115 7 4 2
## 116 7 3 1
## 117 7 1 2
## 118 7 1 2
## 119 7 2 3
## 120 7 2 1
## 121 8 3 2
## 122 8 1 3
## 123 8 3 2
## 124 8 3 1
## 125 8 3 1
## 126 8 4 1
## 127 8 2 4
## 128 8 4 3
## 129 8 3 4
## 130 8 4 1
## 131 8 1 3
## 132 8 3 2
## 133 8 3 4
## 134 8 1 4
## 135 8 4 3
## 136 8 1 2
## 137 8 2 3
## 138 8 3 4
## 139 8 2 1
## 140 8 1 4
## 141 8 4 3
## 142 8 4 3
## 143 8 4 1
## 144 8 1 3
## 145 9 1 2
## 146 9 3 4
## 147 9 1 2
## 148 9 3 2
## 149 9 2 3
## 150 9 1 4
## 151 9 4 3
## 152 9 1 2
## 153 9 3 2
## 154 9 3 2
## 155 9 1 3
## 156 9 2 3
## 157 9 1 3
## 158 9 1 2
## 159 9 2 3
## 160 10 4 3
## 161 10 2 3
## 162 10 4 2
## 163 10 2 3
## 164 10 4 3
## 165 10 4 1
## 166 10 3 1
## 167 10 3 1
## 168 10 4 1
## 169 10 1 2
## 170 10 1 3
## 171 10 3 1
## 172 10 4 2
## 173 10 3 2
## 174 10 1 3
## 175 10 4 3
## 176 10 4 3
## 177 10 4 1
## 178 10 1 3
## 179 11 4 1
## 180 11 3 1
## 181 11 4 3
## 182 11 4 3
## 183 11 4 1
## 184 11 1 3
## 185 11 3 4
## 186 11 4 3
## 187 11 1 3
## 188 11 4 3
## 189 11 3 1
## 190 11 1 3
## 191 11 4 3
## 192 11 2 4
## 193 11 1 3
## 194 11 2 3
## 195 11 2 3
## 196 11 2 1
## 197 11 2 3
## 198 11 4 3
## 199 11 3 1
## 200 11 4 2
## 201 11 2 3
## 202 11 1 3
## 203 12 2 3
## 204 12 1 3
## 205 12 4 3
## 206 12 2 3
## 207 12 4 2
## 208 12 4 3
## 209 12 2 4
## 210 12 3 4
## 211 12 2 3
## 212 12 4 3
## 213 12 3 4
Stanに渡すデータを作成する。
data_ts <- list(
N = length(TARGET_PLAYERS),
G = nrow(df_matches_ts),
Y = length(unique(df_matches_ts$year)),
GY = df_matches_ts$year,
LW = df_matches_ts %>% select(-year)
)
data_ts
## $N
## [1] 4
##
## $G
## [1] 213
##
## $Y
## [1] 12
##
## $GY
## [1] 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3
## [26] 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
## [51] 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
## [76] 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7
## [101] 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8
## [126] 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9
## [151] 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
## [176] 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
## [201] 11 11 12 12 12 12 12 12 12 12 12 12 12
##
## $LW
## loser winner
## 1 1 2
## 2 2 1
## 3 4 1
## 4 3 2
## 5 1 2
## 6 2 1
## 7 1 2
## 8 4 3
## 9 1 4
## 10 3 1
## 11 1 2
## 12 1 2
## 13 2 1
## 14 3 1
## 15 3 1
## 16 3 2
## 17 1 2
## 18 4 2
## 19 1 2
## 20 2 1
## 21 3 2
## 22 2 3
## 23 1 3
## 24 3 1
## 25 3 2
## 26 2 1
## 27 3 1
## 28 4 2
## 29 4 3
## 30 3 2
## 31 2 3
## 32 4 3
## 33 3 2
## 34 2 1
## 35 3 2
## 36 1 4
## 37 4 2
## 38 1 2
## 39 2 3
## 40 3 4
## 41 3 4
## 42 4 2
## 43 3 2
## 44 3 2
## 45 1 2
## 46 4 2
## 47 3 2
## 48 1 2
## 49 4 3
## 50 3 1
## 51 1 2
## 52 1 3
## 53 1 4
## 54 2 4
## 55 3 1
## 56 4 1
## 57 2 3
## 58 1 4
## 59 1 3
## 60 1 3
## 61 3 4
## 62 4 2
## 63 3 2
## 64 1 4
## 65 4 2
## 66 2 4
## 67 3 1
## 68 3 2
## 69 2 1
## 70 2 3
## 71 1 4
## 72 1 3
## 73 3 2
## 74 1 2
## 75 4 1
## 76 2 3
## 77 3 1
## 78 4 1
## 79 2 3
## 80 3 2
## 81 1 2
## 82 4 2
## 83 1 3
## 84 3 2
## 85 3 1
## 86 1 4
## 87 2 4
## 88 4 1
## 89 2 4
## 90 3 1
## 91 1 4
## 92 3 1
## 93 4 1
## 94 3 1
## 95 2 1
## 96 4 2
## 97 3 2
## 98 1 3
## 99 4 2
## 100 2 3
## 101 1 3
## 102 4 3
## 103 3 4
## 104 1 3
## 105 4 2
## 106 2 3
## 107 4 2
## 108 4 3
## 109 2 3
## 110 2 4
## 111 1 2
## 112 2 3
## 113 1 3
## 114 2 3
## 115 4 2
## 116 3 1
## 117 1 2
## 118 1 2
## 119 2 3
## 120 2 1
## 121 3 2
## 122 1 3
## 123 3 2
## 124 3 1
## 125 3 1
## 126 4 1
## 127 2 4
## 128 4 3
## 129 3 4
## 130 4 1
## 131 1 3
## 132 3 2
## 133 3 4
## 134 1 4
## 135 4 3
## 136 1 2
## 137 2 3
## 138 3 4
## 139 2 1
## 140 1 4
## 141 4 3
## 142 4 3
## 143 4 1
## 144 1 3
## 145 1 2
## 146 3 4
## 147 1 2
## 148 3 2
## 149 2 3
## 150 1 4
## 151 4 3
## 152 1 2
## 153 3 2
## 154 3 2
## 155 1 3
## 156 2 3
## 157 1 3
## 158 1 2
## 159 2 3
## 160 4 3
## 161 2 3
## 162 4 2
## 163 2 3
## 164 4 3
## 165 4 1
## 166 3 1
## 167 3 1
## 168 4 1
## 169 1 2
## 170 1 3
## 171 3 1
## 172 4 2
## 173 3 2
## 174 1 3
## 175 4 3
## 176 4 3
## 177 4 1
## 178 1 3
## 179 4 1
## 180 3 1
## 181 4 3
## 182 4 3
## 183 4 1
## 184 1 3
## 185 3 4
## 186 4 3
## 187 1 3
## 188 4 3
## 189 3 1
## 190 1 3
## 191 4 3
## 192 2 4
## 193 1 3
## 194 2 3
## 195 2 3
## 196 2 1
## 197 2 3
## 198 4 3
## 199 3 1
## 200 4 2
## 201 2 3
## 202 1 3
## 203 2 3
## 204 1 3
## 205 4 3
## 206 2 3
## 207 4 2
## 208 4 3
## 209 2 4
## 210 3 4
## 211 2 3
## 212 4 3
## 213 3 4
ここでは、stan_model()
関数で最初にコンパイルしておいてから、
model_ts <- stan_model('model-ts.stan')
sampling()
関数でサンプリングする。
fit_ts <- sampling(object = model_ts, data = data_ts, seed = 1989)
推定結果を確認する。Rhatも問題なく収束している。
print(fit_ts, prob = c(0.025, 0.5, 0.975), digits_summary = 2)
## Inference for Stan model: anon_model.
## 4 chains, each with iter=2000; warmup=1000; thin=1;
## post-warmup draws per chain=1000, total post-warmup draws=4000.
##
## mean se_mean sd 2.5% 50% 97.5% n_eff Rhat
## performance[1,1] 0.26 0.04 1.09 -1.86 0.27 2.36 820 1.00
## performance[1,2] 1.55 0.04 1.09 -0.43 1.48 3.95 934 1.00
## performance[2,1] 0.38 0.03 1.04 -1.76 0.44 2.43 948 1.01
## performance[2,2] 1.57 0.03 1.04 -0.25 1.52 3.99 957 1.01
## performance[3,1] -0.09 0.06 0.99 -2.04 -0.01 1.77 270 1.02
## performance[3,2] 1.25 0.11 1.14 -1.50 1.22 3.48 115 1.04
## performance[4,1] 0.38 0.03 0.99 -1.77 0.42 2.23 1050 1.00
## performance[4,2] 1.97 0.04 1.08 0.09 1.84 4.37 604 1.01
## performance[5,1] 0.59 0.11 1.20 -2.14 0.67 2.76 115 1.04
## performance[5,2] 2.08 0.05 1.11 0.10 2.00 4.50 551 1.01
## performance[6,1] 0.89 0.04 1.09 -1.47 0.91 3.07 709 1.00
## performance[6,2] 1.98 0.04 1.08 0.14 1.89 4.37 696 1.01
## performance[7,1] 0.53 0.20 1.41 -4.35 0.72 2.72 52 1.09
## performance[7,2] 2.06 0.04 1.10 0.05 1.96 4.57 602 1.01
## performance[8,1] 0.08 0.03 0.96 -2.03 0.14 1.84 1386 1.01
## performance[8,2] 1.28 0.03 0.96 -0.35 1.18 3.39 1333 1.00
## performance[9,1] 0.43 0.03 1.00 -1.70 0.50 2.33 873 1.00
## performance[9,2] 1.53 0.06 1.02 -0.26 1.44 3.68 319 1.02
## performance[10,1] 0.27 0.02 0.96 -1.70 0.24 2.14 1826 1.00
## performance[10,2] 1.70 0.07 1.10 -0.20 1.57 3.97 226 1.02
## performance[11,1] 0.65 0.05 1.09 -1.60 0.67 2.70 408 1.01
## performance[11,2] 2.06 0.04 1.08 0.14 1.98 4.43 678 1.01
## performance[12,1] 0.58 0.11 1.19 -2.10 0.67 2.69 111 1.04
## performance[12,2] 2.08 0.05 1.08 0.10 1.99 4.39 418 1.01
## performance[13,1] 0.92 0.07 1.10 -1.32 0.92 2.95 260 1.01
## performance[13,2] 1.97 0.05 1.08 0.08 1.90 4.27 420 1.01
## performance[14,1] 0.34 0.08 1.05 -1.80 0.34 2.43 177 1.03
## performance[14,2] 1.74 0.10 1.12 -0.12 1.61 4.12 137 1.03
## performance[15,1] 0.57 0.06 1.05 -1.66 0.61 2.57 329 1.01
## performance[15,2] 2.02 0.08 1.15 -0.01 1.92 4.51 188 1.02
## performance[16,1] 0.69 0.05 1.04 -1.47 0.73 2.66 381 1.02
## performance[16,2] 2.17 0.06 1.09 0.27 2.07 4.59 352 1.01
## performance[17,1] 1.01 0.07 1.08 -1.30 1.05 3.05 248 1.01
## performance[17,2] 2.39 0.09 1.15 0.43 2.29 4.83 151 1.03
## performance[18,1] 0.47 0.04 1.02 -1.66 0.54 2.43 619 1.01
## performance[18,2] 2.11 0.05 1.07 0.21 2.00 4.52 403 1.01
## performance[19,1] 1.01 0.07 1.07 -1.17 1.08 3.03 221 1.02
## performance[19,2] 2.33 0.06 1.06 0.39 2.31 4.60 304 1.01
## performance[20,1] 1.06 0.07 1.04 -1.07 1.08 3.07 203 1.01
## performance[20,2] 2.17 0.06 1.09 0.33 2.07 4.59 304 1.01
## performance[21,1] 0.64 0.06 1.04 -1.52 0.66 2.66 294 1.01
## performance[21,2] 2.15 0.06 1.09 0.31 2.05 4.65 285 1.01
## performance[22,1] 0.96 0.05 1.00 -1.12 0.93 2.92 390 1.01
## performance[22,2] 1.91 0.05 1.03 0.06 1.88 4.19 473 1.01
## performance[23,1] 0.72 0.06 1.04 -1.54 0.73 2.73 345 1.01
## performance[23,2] 1.76 0.05 1.03 -0.09 1.67 3.99 365 1.00
## performance[24,1] 0.60 0.05 1.05 -1.59 0.65 2.58 401 1.01
## performance[24,2] 1.95 0.06 1.06 0.07 1.87 4.28 268 1.01
## performance[25,1] 0.70 0.06 1.02 -1.49 0.72 2.61 299 1.01
## performance[25,2] 2.26 0.08 1.11 0.36 2.15 4.55 206 1.02
## performance[26,1] 1.13 0.07 1.07 -1.12 1.17 3.16 211 1.02
## performance[26,2] 2.19 0.06 1.08 0.23 2.11 4.45 293 1.01
## performance[27,1] 0.66 0.07 1.06 -1.61 0.70 2.62 222 1.02
## performance[27,2] 1.99 0.06 1.05 0.05 1.95 4.26 303 1.01
## performance[28,1] 0.50 0.06 1.04 -1.67 0.52 2.34 340 1.02
## performance[28,2] 2.11 0.05 1.06 0.26 2.00 4.49 538 1.01
## performance[29,1] 0.33 0.06 0.99 -1.81 0.36 2.01 248 1.02
## performance[29,2] 1.57 0.05 1.02 -0.27 1.55 3.72 408 1.01
## performance[30,1] 0.71 0.08 1.09 -1.67 0.72 2.57 197 1.03
## performance[30,2] 2.18 0.05 1.07 0.20 2.14 4.48 457 1.01
## performance[31,1] 0.96 0.05 1.02 -1.21 1.00 2.88 388 1.01
## performance[31,2] 1.90 0.06 1.03 0.11 1.80 4.15 325 1.01
## performance[32,1] 0.30 0.05 0.98 -1.79 0.35 2.07 414 1.01
## performance[32,2] 1.55 0.04 1.01 -0.25 1.45 3.83 656 1.01
## performance[33,1] 0.68 0.05 1.03 -1.49 0.68 2.60 369 1.01
## performance[33,2] 2.18 0.06 1.08 0.29 2.09 4.64 305 1.01
## performance[34,1] 1.08 0.05 1.04 -1.09 1.08 3.09 384 1.01
## performance[34,2] 2.19 0.05 1.05 0.38 2.09 4.52 378 1.00
## performance[35,1] 0.85 0.08 1.09 -1.39 0.88 2.94 177 1.02
## performance[35,2] 2.43 0.07 1.10 0.44 2.37 4.82 234 1.01
## performance[36,1] 0.70 0.08 1.03 -1.40 0.66 2.72 161 1.01
## performance[36,2] 2.02 0.09 1.10 0.06 1.98 4.34 166 1.02
## performance[37,1] 1.03 0.07 1.06 -1.09 1.09 3.13 238 1.01
## performance[37,2] 2.46 0.08 1.10 0.50 2.35 4.89 186 1.01
## performance[38,1] 0.84 0.09 1.10 -1.28 0.84 2.93 156 1.01
## performance[38,2] 2.42 0.07 1.11 0.44 2.37 4.85 230 1.02
## performance[39,1] 1.23 0.08 1.10 -0.99 1.23 3.36 167 1.02
## performance[39,2] 2.16 0.07 1.09 0.21 2.10 4.48 221 1.01
## performance[40,1] 0.56 0.09 1.13 -1.63 0.60 2.74 148 1.02
## performance[40,2] 1.91 0.08 1.09 0.07 1.80 4.31 209 1.01
## performance[41,1] 0.54 0.10 1.13 -1.57 0.58 2.61 125 1.02
## performance[41,2] 1.85 0.11 1.16 -0.42 1.83 4.17 104 1.02
## performance[42,1] 1.07 0.09 1.12 -1.25 1.08 3.09 152 1.03
## performance[42,2] 2.49 0.09 1.14 0.56 2.44 4.85 144 1.03
## performance[43,1] 0.81 0.07 1.11 -1.52 0.84 2.97 226 1.02
## performance[43,2] 2.38 0.08 1.10 0.44 2.26 4.74 175 1.01
## performance[44,1] 0.78 0.07 1.10 -1.44 0.79 2.90 278 1.01
## performance[44,2] 2.35 0.09 1.14 0.40 2.27 4.80 162 1.01
## performance[45,1] 0.80 0.09 1.08 -1.35 0.81 2.95 147 1.01
## performance[45,2] 2.47 0.08 1.10 0.52 2.42 4.78 176 1.02
## performance[46,1] 1.09 0.11 1.16 -1.24 1.08 3.13 119 1.04
## performance[46,2] 2.50 0.07 1.09 0.58 2.45 4.90 239 1.01
## performance[47,1] 0.75 0.07 1.14 -1.73 0.82 2.97 288 1.01
## performance[47,2] 2.45 0.09 1.16 0.38 2.37 4.77 163 1.03
## performance[48,1] 0.94 0.08 1.09 -1.40 1.00 2.99 180 1.02
## performance[48,2] 2.47 0.08 1.10 0.48 2.42 4.74 186 1.02
## performance[49,1] 0.79 0.08 1.05 -1.33 0.81 2.87 174 1.02
## performance[49,2] 1.85 0.07 1.08 -0.07 1.72 4.28 226 1.01
## performance[50,1] 0.54 0.07 1.11 -1.83 0.58 2.67 236 1.01
## performance[50,2] 1.77 0.08 1.05 -0.07 1.70 4.09 184 1.02
## performance[51,1] 0.88 0.08 1.06 -1.22 0.86 3.01 158 1.02
## performance[51,2] 2.41 0.08 1.09 0.46 2.32 4.78 182 1.01
## performance[52,1] 0.64 0.08 1.05 -1.56 0.65 2.72 193 1.02
## performance[52,2] 1.86 0.08 1.10 -0.09 1.77 4.21 191 1.02
## performance[53,1] 0.63 0.10 1.10 -1.47 0.67 2.74 128 1.02
## performance[53,2] 1.98 0.07 1.05 0.11 1.90 4.27 211 1.01
## performance[54,1] 1.27 0.08 1.07 -1.00 1.33 3.29 200 1.01
## performance[54,2] 2.28 0.09 1.10 0.36 2.23 4.62 157 1.02
## performance[55,1] 0.56 0.07 1.06 -1.69 0.60 2.53 208 1.01
## performance[55,2] 1.80 0.10 1.09 -0.17 1.71 4.05 123 1.03
## performance[56,1] 0.65 0.10 1.14 -1.39 0.68 2.85 129 1.01
## performance[56,2] 1.89 0.09 1.07 0.00 1.80 4.14 156 1.02
## performance[57,1] 1.20 0.08 1.09 -0.98 1.23 3.36 201 1.02
## performance[57,2] 2.16 0.08 1.10 0.22 2.10 4.50 169 1.02
## performance[58,1] 0.77 0.10 1.11 -1.51 0.78 2.73 130 1.03
## performance[58,2] 1.99 0.08 1.08 0.01 1.96 4.35 196 1.02
## performance[59,1] 0.83 0.09 1.15 -1.63 0.87 3.13 161 1.02
## performance[59,2] 2.05 0.09 1.14 0.02 1.96 4.41 150 1.03
## performance[60,1] 0.74 0.09 1.15 -1.56 0.74 3.13 150 1.02
## performance[60,2] 1.97 0.08 1.14 0.01 1.84 4.54 210 1.01
## performance[61,1] 0.73 0.10 1.15 -1.54 0.76 3.07 145 1.02
## performance[61,2] 2.03 0.11 1.19 -0.04 1.98 4.57 108 1.02
## performance[62,1] 1.13 0.09 1.12 -1.17 1.15 3.33 166 1.02
## performance[62,2] 2.47 0.09 1.17 0.49 2.34 5.03 187 1.01
## performance[63,1] 0.92 0.10 1.16 -1.46 0.94 3.22 144 1.02
## performance[63,2] 2.46 0.13 1.24 0.40 2.32 5.10 93 1.05
## performance[64,1] 0.82 0.09 1.13 -1.49 0.79 3.06 150 1.02
## performance[64,2] 2.06 0.10 1.15 0.03 1.98 4.52 129 1.02
## performance[65,1] 1.08 0.10 1.11 -1.10 1.05 3.34 132 1.02
## performance[65,2] 2.45 0.09 1.12 0.45 2.42 4.83 152 1.02
## performance[66,1] 1.15 0.12 1.15 -1.05 1.17 3.39 93 1.03
## performance[66,2] 2.21 0.12 1.17 0.10 2.16 4.68 92 1.03
## performance[67,1] 0.77 0.09 1.12 -1.57 0.75 3.03 151 1.02
## performance[67,2] 2.06 0.09 1.13 0.05 2.04 4.46 176 1.02
## performance[68,1] 0.91 0.09 1.16 -1.51 0.99 3.15 150 1.02
## performance[68,2] 2.37 0.08 1.14 0.29 2.27 4.83 197 1.01
## performance[69,1] 1.20 0.09 1.12 -0.94 1.20 3.38 153 1.03
## performance[69,2] 2.25 0.08 1.15 0.17 2.15 4.72 194 1.02
## performance[70,1] 1.07 0.07 1.14 -1.30 1.03 3.32 285 1.00
## performance[70,2] 2.11 0.08 1.14 0.23 2.01 4.56 205 1.01
## performance[71,1] 0.85 0.09 1.12 -1.35 0.89 3.04 172 1.02
## performance[71,2] 2.08 0.08 1.13 0.02 2.00 4.61 178 1.01
## performance[72,1] 0.77 0.08 1.14 -1.50 0.79 3.02 210 1.01
## performance[72,2] 2.02 0.09 1.11 0.04 1.94 4.43 157 1.02
## performance[73,1] 0.93 0.10 1.16 -1.50 0.98 3.15 145 1.02
## performance[73,2] 2.38 0.10 1.15 0.37 2.26 4.90 146 1.02
## performance[74,1] 0.95 0.09 1.12 -1.33 0.90 3.18 168 1.02
## performance[74,2] 2.34 0.09 1.15 0.42 2.27 4.89 157 1.01
## performance[75,1] 0.92 0.09 1.12 -1.37 0.92 3.09 157 1.02
## performance[75,2] 2.07 0.08 1.13 0.11 1.96 4.59 197 1.01
## performance[76,1] 1.12 0.09 1.14 -1.19 1.13 3.33 151 1.02
## performance[76,2] 2.20 0.09 1.15 0.19 2.14 4.76 166 1.02
## performance[77,1] 0.70 0.09 1.16 -1.65 0.67 3.05 157 1.02
## performance[77,2] 2.04 0.09 1.14 0.06 1.97 4.46 172 1.03
## performance[78,1] 0.91 0.09 1.12 -1.31 0.92 3.14 166 1.01
## performance[78,2] 2.05 0.11 1.16 0.14 1.96 4.54 122 1.02
## performance[79,1] 1.11 0.09 1.11 -1.17 1.15 3.26 152 1.02
## performance[79,2] 2.19 0.09 1.17 0.07 2.13 4.66 176 1.02
## performance[80,1] 0.86 0.09 1.14 -1.28 0.87 3.08 171 1.01
## performance[80,2] 2.37 0.10 1.15 0.32 2.29 4.94 140 1.02
## performance[81,1] 1.20 0.08 1.13 -1.14 1.16 3.45 223 1.01
## performance[81,2] 2.52 0.09 1.18 0.44 2.41 5.11 170 1.02
## performance[82,1] 1.17 0.10 1.15 -1.33 1.15 3.37 145 1.02
## performance[82,2] 2.50 0.09 1.14 0.51 2.40 4.97 154 1.02
## performance[83,1] 1.00 0.09 1.12 -1.23 1.01 3.30 141 1.02
## performance[83,2] 2.09 0.12 1.21 0.00 1.97 4.59 104 1.04
## performance[84,1] 0.99 0.11 1.17 -1.42 1.00 3.27 108 1.03
## performance[84,2] 2.42 0.09 1.16 0.34 2.42 4.92 164 1.02
## performance[85,1] 0.84 0.10 1.11 -1.32 0.83 3.05 124 1.02
## performance[85,2] 2.24 0.09 1.13 0.21 2.17 4.65 175 1.02
## performance[86,1] 1.08 0.10 1.15 -1.26 1.08 3.30 145 1.02
## performance[86,2] 2.26 0.09 1.16 0.27 2.17 4.76 160 1.02
## performance[87,1] 1.29 0.10 1.15 -1.19 1.34 3.56 126 1.03
## performance[87,2] 2.38 0.09 1.14 0.36 2.28 4.88 146 1.02
## performance[88,1] 1.10 0.09 1.15 -1.24 1.07 3.39 170 1.02
## performance[88,2] 2.30 0.10 1.16 0.32 2.20 4.83 148 1.02
## performance[89,1] 1.29 0.08 1.16 -1.16 1.28 3.60 199 1.01
## performance[89,2] 2.35 0.09 1.14 0.34 2.24 4.88 166 1.01
## performance[90,1] 0.81 0.09 1.13 -1.36 0.78 3.13 151 1.01
## performance[90,2] 2.17 0.09 1.14 0.27 2.05 4.65 172 1.01
## performance[91,1] 1.13 0.10 1.12 -1.18 1.16 3.31 132 1.03
## performance[91,2] 2.31 0.08 1.10 0.36 2.24 4.72 178 1.02
## performance[92,1] 0.85 0.09 1.13 -1.46 0.83 3.06 157 1.02
## performance[92,2] 2.18 0.09 1.14 0.23 2.04 4.76 174 1.01
## performance[93,1] 1.10 0.10 1.16 -1.43 1.12 3.36 138 1.02
## performance[93,2] 2.31 0.09 1.12 0.27 2.26 4.78 150 1.02
## performance[94,1] 0.82 0.09 1.11 -1.48 0.82 3.01 152 1.02
## performance[94,2] 2.22 0.09 1.14 0.23 2.13 4.76 174 1.02
## performance[95,1] 1.32 0.11 1.15 -0.96 1.28 3.67 106 1.03
## performance[95,2] 2.38 0.11 1.16 0.39 2.29 4.83 106 1.02
## performance[96,1] 1.18 0.08 1.13 -1.17 1.23 3.46 193 1.02
## performance[96,2] 2.52 0.08 1.11 0.50 2.51 4.91 187 1.02
## performance[97,1] 0.82 0.14 1.25 -1.87 0.88 3.26 75 1.04
## performance[97,2] 2.40 0.08 1.16 0.38 2.30 4.89 202 1.02
## performance[98,1] 1.32 0.11 1.17 -1.09 1.38 3.70 114 1.02
## performance[98,2] 2.92 0.11 1.21 0.78 2.87 5.58 112 1.02
## performance[99,1] 1.20 0.11 1.16 -1.17 1.19 3.43 114 1.04
## performance[99,2] 2.49 0.09 1.13 0.54 2.41 4.97 150 1.02
## performance[100,1] 1.64 0.11 1.13 -0.61 1.61 3.89 108 1.02
## performance[100,2] 3.05 0.12 1.21 0.95 2.93 5.68 100 1.03
## performance[101,1] 1.32 0.10 1.18 -0.94 1.27 3.71 139 1.02
## performance[101,2] 2.92 0.11 1.23 0.89 2.80 5.63 132 1.02
## performance[102,1] 1.24 0.12 1.25 -1.09 1.26 3.59 101 1.03
## performance[102,2] 2.89 0.14 1.28 0.49 2.83 5.61 80 1.03
## performance[103,1] 1.73 0.10 1.19 -0.66 1.68 4.09 128 1.02
## performance[103,2] 2.65 0.10 1.20 0.52 2.58 5.15 132 1.03
## performance[104,1] 1.28 0.11 1.21 -1.29 1.25 3.67 115 1.03
## performance[104,2] 2.96 0.11 1.22 0.89 2.85 5.61 130 1.02
## performance[105,1] 1.17 0.09 1.14 -1.12 1.20 3.39 161 1.03
## performance[105,2] 2.45 0.10 1.13 0.43 2.40 4.92 120 1.03
## performance[106,1] 1.67 0.10 1.15 -0.66 1.69 3.84 130 1.03
## performance[106,2] 3.09 0.11 1.18 0.95 3.01 5.68 125 1.02
## performance[107,1] 1.13 0.11 1.15 -1.14 1.10 3.40 102 1.03
## performance[107,2] 2.49 0.12 1.14 0.47 2.41 4.87 95 1.03
## performance[108,1] 1.27 0.11 1.22 -1.18 1.23 3.67 115 1.03
## performance[108,2] 2.95 0.13 1.25 0.79 2.82 5.66 98 1.03
## performance[109,1] 1.58 0.14 1.21 -0.93 1.61 3.91 73 1.03
## performance[109,2] 3.04 0.11 1.19 0.91 2.94 5.71 115 1.02
## performance[110,1] 1.43 0.10 1.09 -0.70 1.45 3.56 113 1.03
## performance[110,2] 2.47 0.12 1.20 0.33 2.33 4.84 101 1.04
## performance[111,1] 1.18 0.10 1.13 -1.13 1.22 3.36 133 1.03
## performance[111,2] 2.44 0.11 1.14 0.48 2.33 4.91 114 1.02
## performance[112,1] 1.63 0.11 1.13 -0.54 1.63 3.94 101 1.02
## performance[112,2] 3.03 0.12 1.22 0.93 2.97 5.64 99 1.02
## performance[113,1] 1.34 0.11 1.20 -1.14 1.38 3.71 119 1.03
## performance[113,2] 3.01 0.11 1.20 0.83 2.98 5.59 121 1.03
## performance[114,1] 1.55 0.15 1.21 -0.77 1.54 3.98 67 1.04
## performance[114,2] 2.99 0.14 1.22 0.96 2.92 5.60 80 1.03
## performance[115,1] 1.17 0.10 1.16 -1.22 1.18 3.42 127 1.03
## performance[115,2] 2.48 0.10 1.14 0.48 2.42 4.97 130 1.03
## performance[116,1] 1.73 0.11 1.17 -0.65 1.72 4.03 117 1.03
## performance[116,2] 2.57 0.10 1.14 0.55 2.46 5.03 140 1.02
## performance[117,1] 1.15 0.10 1.13 -1.27 1.20 3.36 142 1.02
## performance[117,2] 2.44 0.09 1.11 0.49 2.34 4.80 146 1.02
## performance[118,1] 1.14 0.11 1.16 -1.30 1.18 3.45 118 1.03
## performance[118,2] 2.44 0.10 1.16 0.33 2.41 4.99 130 1.02
## performance[119,1] 1.63 0.12 1.14 -0.49 1.62 3.99 87 1.03
## performance[119,2] 3.01 0.13 1.23 0.87 2.96 5.59 91 1.02
## performance[120,1] 1.38 0.10 1.10 -0.78 1.35 3.66 119 1.03
## performance[120,2] 2.35 0.10 1.14 0.37 2.25 4.88 126 1.02
## performance[121,1] 1.71 0.11 1.22 -0.71 1.72 4.28 127 1.02
## performance[121,2] 2.97 0.12 1.22 0.83 2.93 5.65 105 1.03
## performance[122,1] 1.30 0.10 1.25 -1.23 1.36 3.77 170 1.02
## performance[122,2] 2.76 0.13 1.27 0.57 2.65 5.58 100 1.02
## performance[123,1] 1.67 0.12 1.21 -0.77 1.62 4.08 102 1.03
## performance[123,2] 2.94 0.13 1.25 0.74 2.83 5.77 91 1.03
## performance[124,1] 1.56 0.12 1.22 -0.88 1.59 4.00 101 1.04
## performance[124,2] 2.65 0.12 1.23 0.51 2.60 5.23 101 1.03
## performance[125,1] 1.54 0.13 1.24 -0.86 1.49 4.11 94 1.03
## performance[125,2] 2.55 0.13 1.25 0.49 2.44 5.28 90 1.03
## performance[126,1] 1.22 0.12 1.26 -1.39 1.23 3.61 106 1.04
## performance[126,2] 2.43 0.12 1.24 0.20 2.36 5.02 101 1.03
## performance[127,1] 1.55 0.11 1.20 -0.75 1.52 3.96 112 1.02
## performance[127,2] 2.61 0.10 1.20 0.55 2.55 5.20 133 1.02
## performance[128,1] 1.39 0.12 1.21 -1.00 1.41 3.70 110 1.03
## performance[128,2] 2.78 0.11 1.22 0.64 2.63 5.46 130 1.02
## performance[129,1] 1.52 0.12 1.21 -0.94 1.51 3.88 106 1.03
## performance[129,2] 2.64 0.10 1.21 0.53 2.51 5.30 142 1.02
## performance[130,1] 1.20 0.13 1.23 -1.30 1.24 3.57 89 1.04
## performance[130,2] 2.38 0.11 1.20 0.30 2.28 5.00 111 1.03
## performance[131,1] 1.28 0.09 1.26 -1.21 1.22 3.83 205 1.02
## performance[131,2] 2.78 0.12 1.26 0.53 2.62 5.54 110 1.02
## performance[132,1] 1.70 0.12 1.20 -0.63 1.63 4.15 102 1.03
## performance[132,2] 2.92 0.12 1.21 0.78 2.79 5.55 105 1.02
## performance[133,1] 1.52 0.11 1.22 -0.92 1.54 3.89 115 1.03
## performance[133,2] 2.63 0.10 1.24 0.48 2.57 5.26 139 1.02
## performance[134,1] 1.20 0.09 1.23 -1.33 1.22 3.71 175 1.02
## performance[134,2] 2.45 0.11 1.23 0.22 2.40 5.04 115 1.03
## performance[135,1] 1.39 0.13 1.29 -1.16 1.44 4.05 106 1.03
## performance[135,2] 2.84 0.11 1.24 0.65 2.79 5.49 119 1.02
## performance[136,1] 1.31 0.12 1.24 -1.14 1.25 3.91 112 1.03
## performance[136,2] 2.83 0.13 1.28 0.62 2.73 5.83 92 1.03
## performance[137,1] 1.67 0.11 1.21 -0.85 1.64 4.15 129 1.02
## performance[137,2] 2.96 0.12 1.23 0.81 2.87 5.62 109 1.03
## performance[138,1] 1.56 0.11 1.23 -0.86 1.49 4.04 120 1.03
## performance[138,2] 2.64 0.11 1.26 0.39 2.59 5.32 124 1.02
## performance[139,1] 1.57 0.11 1.20 -0.85 1.61 3.99 116 1.03
## performance[139,2] 2.59 0.12 1.19 0.43 2.46 5.15 97 1.03
## performance[140,1] 1.16 0.10 1.24 -1.31 1.19 3.55 167 1.02
## performance[140,2] 2.45 0.12 1.21 0.26 2.33 5.03 109 1.02
## performance[141,1] 1.34 0.11 1.24 -1.22 1.42 3.71 126 1.03
## performance[141,2] 2.80 0.11 1.24 0.60 2.75 5.48 130 1.02
## performance[142,1] 1.35 0.12 1.24 -1.10 1.42 3.72 110 1.03
## performance[142,2] 2.80 0.11 1.23 0.65 2.65 5.51 118 1.02
## performance[143,1] 1.17 0.13 1.21 -1.32 1.21 3.53 92 1.04
## performance[143,2] 2.39 0.13 1.24 0.31 2.25 5.23 85 1.03
## performance[144,1] 1.25 0.11 1.26 -1.23 1.18 3.76 124 1.02
## performance[144,2] 2.76 0.11 1.24 0.65 2.64 5.48 132 1.02
## performance[145,1] 1.28 0.11 1.20 -1.09 1.22 3.69 114 1.04
## performance[145,2] 2.95 0.12 1.23 0.75 2.91 5.48 110 1.02
## performance[146,1] 1.69 0.14 1.27 -0.71 1.69 4.20 79 1.04
## performance[146,2] 2.71 0.13 1.25 0.50 2.61 5.34 98 1.03
## performance[147,1] 1.20 0.09 1.20 -1.04 1.14 3.75 161 1.02
## performance[147,2] 2.92 0.13 1.25 0.79 2.79 5.63 96 1.03
## performance[148,1] 2.01 0.11 1.24 -0.46 1.97 4.47 126 1.03
## performance[148,2] 3.19 0.11 1.21 1.06 3.07 5.78 111 1.02
## performance[149,1] 2.16 0.14 1.29 -0.26 2.12 4.49 86 1.05
## performance[149,2] 3.35 0.14 1.33 0.93 3.25 5.94 95 1.05
## performance[150,1] 1.10 0.10 1.11 -1.08 1.10 3.44 132 1.03
## performance[150,2] 2.35 0.11 1.18 0.33 2.18 4.96 122 1.02
## performance[151,1] 1.55 0.12 1.28 -0.97 1.56 3.98 111 1.04
## performance[151,2] 3.10 0.12 1.29 0.82 2.99 5.70 114 1.04
## performance[152,1] 1.19 0.12 1.19 -1.02 1.12 3.74 95 1.03
## performance[152,2] 2.94 0.12 1.26 0.66 2.81 5.71 102 1.03
## performance[153,1] 2.02 0.12 1.22 -0.54 2.06 4.43 112 1.03
## performance[153,2] 3.21 0.12 1.21 1.03 3.09 5.79 108 1.03
## performance[154,1] 2.04 0.12 1.22 -0.39 2.08 4.39 111 1.04
## performance[154,2] 3.24 0.13 1.24 1.01 3.20 5.90 85 1.04
## performance[155,1] 1.27 0.10 1.16 -0.89 1.24 3.85 133 1.02
## performance[155,2] 2.98 0.11 1.29 0.71 2.91 5.68 141 1.03
## performance[156,1] 2.14 0.12 1.21 -0.27 2.14 4.56 96 1.04
## performance[156,2] 3.35 0.13 1.25 1.16 3.28 5.92 100 1.04
## performance[157,1] 1.33 0.12 1.23 -1.01 1.28 3.79 102 1.04
## performance[157,2] 2.99 0.11 1.28 0.72 2.90 5.83 142 1.03
## performance[158,1] 1.23 0.10 1.18 -1.07 1.18 3.65 138 1.03
## performance[158,2] 2.91 0.12 1.22 0.71 2.79 5.58 103 1.03
## performance[159,1] 2.08 0.14 1.22 -0.30 2.02 4.54 82 1.03
## performance[159,2] 3.26 0.12 1.22 1.17 3.12 5.90 101 1.03
## performance[160,1] 1.15 0.13 1.18 -1.04 1.07 3.59 89 1.04
## performance[160,2] 3.12 0.13 1.28 0.88 2.99 5.93 102 1.03
## performance[161,1] 2.12 0.13 1.26 -0.35 2.11 4.58 91 1.04
## performance[161,2] 3.51 0.13 1.29 1.28 3.42 6.10 100 1.05
## performance[162,1] 1.06 0.12 1.15 -1.21 1.07 3.38 95 1.04
## performance[162,2] 2.82 0.13 1.27 0.58 2.71 5.53 99 1.03
## performance[163,1] 2.11 0.12 1.26 -0.47 2.12 4.55 104 1.04
## performance[163,2] 3.47 0.13 1.26 1.33 3.37 6.10 92 1.05
## performance[164,1] 1.16 0.11 1.15 -1.03 1.15 3.56 107 1.03
## performance[164,2] 3.10 0.13 1.27 0.93 2.94 5.91 90 1.04
## performance[165,1] 1.08 0.14 1.17 -1.10 1.00 3.49 76 1.05
## performance[165,2] 2.87 0.12 1.28 0.64 2.78 5.63 106 1.04
## performance[166,1] 2.29 0.13 1.22 -0.14 2.29 4.73 87 1.04
## performance[166,2] 3.38 0.13 1.30 1.14 3.28 6.18 95 1.04
## performance[167,1] 2.24 0.15 1.22 -0.14 2.18 4.66 71 1.04
## performance[167,2] 3.35 0.14 1.30 1.04 3.26 5.96 86 1.05
## performance[168,1] 1.10 0.11 1.16 -1.12 1.06 3.46 104 1.04
## performance[168,2] 2.88 0.13 1.24 0.73 2.78 5.53 87 1.04
## performance[169,1] 1.99 0.15 1.25 -0.39 1.92 4.53 73 1.05
## performance[169,2] 3.12 0.16 1.26 0.97 3.00 5.80 65 1.05
## performance[170,1] 2.11 0.15 1.23 -0.27 2.09 4.54 69 1.05
## performance[170,2] 3.42 0.14 1.26 1.27 3.28 6.23 81 1.03
## performance[171,1] 2.28 0.13 1.25 -0.18 2.26 4.65 100 1.05
## performance[171,2] 3.36 0.13 1.27 1.09 3.26 5.90 94 1.05
## performance[172,1] 1.09 0.13 1.16 -1.17 1.03 3.47 84 1.05
## performance[172,2] 2.80 0.15 1.30 0.50 2.66 5.64 71 1.04
## performance[173,1] 2.24 0.16 1.22 0.03 2.16 4.80 58 1.05
## performance[173,2] 3.27 0.16 1.26 1.14 3.16 6.06 62 1.05
## performance[174,1] 2.13 0.15 1.30 -0.51 2.13 4.67 76 1.05
## performance[174,2] 3.43 0.14 1.26 1.21 3.29 6.20 85 1.03
## performance[175,1] 1.14 0.12 1.16 -1.10 1.10 3.52 89 1.04
## performance[175,2] 3.15 0.13 1.24 0.97 3.09 5.79 92 1.03
## performance[176,1] 1.13 0.13 1.16 -1.00 1.03 3.58 82 1.04
## performance[176,2] 3.10 0.13 1.28 0.95 2.99 5.78 98 1.03
## performance[177,1] 1.02 0.13 1.17 -1.07 0.97 3.46 77 1.04
## performance[177,2] 2.92 0.15 1.34 0.57 2.79 5.69 83 1.05
## performance[178,1] 2.13 0.15 1.26 -0.29 2.11 4.65 67 1.04
## performance[178,2] 3.43 0.12 1.24 1.28 3.39 6.17 112 1.03
## performance[179,1] 1.40 0.15 1.41 -1.28 1.33 4.17 85 1.06
## performance[179,2] 3.13 0.14 1.40 0.68 3.02 6.04 106 1.05
## performance[180,1] 2.45 0.16 1.31 -0.11 2.39 5.07 66 1.05
## performance[180,2] 3.51 0.14 1.29 1.23 3.44 6.26 85 1.05
## performance[181,1] 1.28 0.16 1.32 -1.19 1.25 4.05 67 1.05
## performance[181,2] 3.48 0.13 1.35 1.12 3.38 6.26 104 1.04
## performance[182,1] 1.42 0.15 1.35 -1.21 1.41 4.36 80 1.04
## performance[182,2] 3.42 0.13 1.32 1.11 3.33 6.30 99 1.03
## performance[183,1] 1.27 0.15 1.29 -1.22 1.19 3.97 73 1.04
## performance[183,2] 3.09 0.13 1.33 0.73 3.00 5.93 108 1.04
## performance[184,1] 2.44 0.16 1.37 -0.23 2.40 5.24 75 1.06
## performance[184,2] 3.72 0.13 1.36 1.46 3.59 6.64 110 1.03
## performance[185,1] 2.00 0.16 1.28 -0.38 1.90 4.70 61 1.06
## performance[185,2] 2.71 0.17 1.30 0.59 2.60 5.60 59 1.06
## performance[186,1] 1.38 0.14 1.33 -1.23 1.35 4.18 96 1.04
## performance[186,2] 3.37 0.14 1.37 1.09 3.23 6.46 93 1.03
## performance[187,1] 2.34 0.13 1.33 -0.37 2.33 4.80 103 1.04
## performance[187,2] 3.73 0.14 1.32 1.39 3.64 6.46 91 1.04
## performance[188,1] 1.41 0.16 1.35 -1.14 1.36 4.13 70 1.05
## performance[188,2] 3.44 0.13 1.32 1.19 3.36 6.41 98 1.04
## performance[189,1] 2.50 0.15 1.28 -0.06 2.48 5.05 71 1.05
## performance[189,2] 3.51 0.15 1.29 1.22 3.36 6.39 74 1.05
## performance[190,1] 2.37 0.14 1.33 -0.18 2.37 5.05 88 1.05
## performance[190,2] 3.70 0.13 1.27 1.48 3.63 6.35 103 1.03
## performance[191,1] 1.42 0.16 1.35 -1.19 1.37 4.17 71 1.05
## performance[191,2] 3.42 0.13 1.32 1.10 3.37 6.31 101 1.04
## performance[192,1] 1.14 0.14 1.27 -1.33 1.08 3.79 87 1.05
## performance[192,2] 2.24 0.15 1.22 0.17 2.15 5.03 67 1.06
## performance[193,1] 2.40 0.13 1.34 -0.19 2.34 5.04 102 1.04
## performance[193,2] 3.77 0.14 1.33 1.43 3.65 6.61 94 1.04
## performance[194,1] 1.52 0.13 1.31 -1.07 1.53 4.16 102 1.04
## performance[194,2] 3.50 0.13 1.34 1.15 3.41 6.26 100 1.04
## performance[195,1] 1.47 0.12 1.31 -1.11 1.49 4.17 118 1.03
## performance[195,2] 3.44 0.13 1.31 1.19 3.30 6.20 98 1.03
## performance[196,1] 1.40 0.13 1.29 -1.13 1.33 3.99 106 1.03
## performance[196,2] 3.13 0.11 1.29 0.80 3.07 5.95 138 1.03
## performance[197,1] 1.48 0.14 1.32 -1.03 1.48 4.14 87 1.04
## performance[197,2] 3.43 0.15 1.39 1.08 3.26 6.41 87 1.03
## performance[198,1] 1.39 0.16 1.35 -1.14 1.29 4.21 75 1.04
## performance[198,2] 3.48 0.12 1.36 1.09 3.36 6.36 119 1.04
## performance[199,1] 2.52 0.14 1.26 0.08 2.50 5.08 80 1.05
## performance[199,2] 3.56 0.12 1.33 1.25 3.47 6.60 121 1.03
## performance[200,1] 1.02 0.14 1.28 -1.51 0.96 3.62 88 1.04
## performance[200,2] 2.21 0.13 1.25 0.10 2.06 4.94 87 1.03
## performance[201,1] 1.51 0.14 1.31 -1.03 1.47 4.23 94 1.04
## performance[201,2] 3.39 0.15 1.34 1.10 3.22 6.33 78 1.04
## performance[202,1] 2.34 0.12 1.33 -0.26 2.33 4.87 118 1.04
## performance[202,2] 3.68 0.13 1.32 1.32 3.60 6.41 105 1.04
## performance[203,1] 1.39 0.13 1.34 -1.03 1.29 4.20 106 1.03
## performance[203,2] 3.50 0.13 1.42 1.03 3.38 6.60 113 1.03
## performance[204,1] 2.16 0.14 1.44 -0.65 2.14 5.25 107 1.04
## performance[204,2] 3.66 0.13 1.38 1.27 3.57 6.69 118 1.02
## performance[205,1] 1.71 0.13 1.40 -0.94 1.71 4.50 119 1.04
## performance[205,2] 3.49 0.14 1.39 1.03 3.34 6.59 104 1.03
## performance[206,1] 1.41 0.11 1.31 -1.07 1.42 4.01 147 1.03
## performance[206,2] 3.50 0.14 1.40 1.09 3.44 6.59 103 1.04
## performance[207,1] 1.14 0.16 1.39 -1.37 1.09 3.92 75 1.04
## performance[207,2] 2.30 0.13 1.30 0.09 2.13 4.99 104 1.03
## performance[208,1] 1.69 0.12 1.40 -1.05 1.70 4.41 129 1.04
## performance[208,2] 3.52 0.13 1.38 1.07 3.46 6.37 105 1.03
## performance[209,1] 1.22 0.11 1.31 -1.30 1.21 4.12 130 1.03
## performance[209,2] 2.58 0.15 1.38 0.23 2.43 5.57 86 1.04
## performance[210,1] 2.26 0.15 1.40 -0.50 2.22 5.20 83 1.05
## performance[210,2] 3.20 0.16 1.43 0.70 3.07 6.05 80 1.06
## performance[211,1] 1.45 0.11 1.33 -1.10 1.45 4.19 152 1.02
## performance[211,2] 3.47 0.13 1.41 1.00 3.37 6.54 113 1.03
## performance[212,1] 1.60 0.15 1.45 -1.08 1.60 4.69 89 1.04
## performance[212,2] 3.51 0.14 1.44 1.08 3.33 6.65 112 1.03
## performance[213,1] 2.24 0.16 1.39 -0.47 2.21 5.17 73 1.06
## performance[213,2] 3.17 0.17 1.40 0.65 3.07 6.03 72 1.05
## mu[1,1] 0.90 0.03 0.65 0.03 0.80 2.48 365 1.01
## mu[1,2] 1.14 0.05 0.63 0.12 1.08 2.51 137 1.02
## mu[1,3] 1.51 0.07 0.66 0.37 1.46 2.96 98 1.03
## mu[1,4] 1.21 0.08 0.66 0.13 1.16 2.75 72 1.04
## mu[1,5] 1.43 0.08 0.70 0.28 1.37 3.10 69 1.04
## mu[1,6] 1.72 0.09 0.74 0.51 1.63 3.51 62 1.04
## mu[1,7] 1.62 0.10 0.78 0.32 1.51 3.42 57 1.05
## mu[1,8] 1.76 0.11 0.83 0.42 1.63 3.66 53 1.05
## mu[1,9] 1.51 0.11 0.87 0.16 1.40 3.55 58 1.06
## mu[1,10] 2.58 0.14 0.95 1.02 2.49 4.72 49 1.07
## mu[1,11] 2.81 0.14 1.02 1.16 2.69 4.99 56 1.08
## mu[1,12] 2.64 0.16 1.33 0.37 2.48 5.77 72 1.08
## mu[2,1] 0.95 0.04 0.71 0.03 0.83 2.59 398 1.01
## mu[2,2] 1.65 0.05 0.69 0.37 1.62 3.15 219 1.02
## mu[2,3] 1.81 0.06 0.62 0.75 1.77 3.18 111 1.03
## mu[2,4] 2.08 0.08 0.68 0.96 2.01 3.65 81 1.04
## mu[2,5] 1.93 0.09 0.71 0.77 1.82 3.56 62 1.04
## mu[2,6] 2.00 0.10 0.74 0.72 1.91 3.69 59 1.05
## mu[2,7] 2.03 0.10 0.77 0.77 1.91 3.82 54 1.05
## mu[2,8] 2.34 0.12 0.87 0.91 2.19 4.27 50 1.06
## mu[2,9] 2.67 0.13 0.91 1.16 2.58 4.63 48 1.06
## mu[2,10] 2.56 0.14 0.96 0.93 2.48 4.60 48 1.07
## mu[2,11] 1.72 0.12 0.97 0.19 1.61 3.98 61 1.06
## mu[2,12] 1.65 0.12 0.99 0.12 1.53 3.95 71 1.05
## mu[3,1] 0.52 0.02 0.50 0.01 0.37 1.77 653 1.01
## mu[3,2] 0.73 0.02 0.50 0.03 0.67 1.91 428 1.01
## mu[3,3] 1.06 0.06 0.56 0.15 0.99 2.30 100 1.04
## mu[3,4] 1.16 0.08 0.62 0.20 1.07 2.63 67 1.04
## mu[3,5] 1.35 0.09 0.70 0.27 1.28 2.98 62 1.04
## mu[3,6] 1.30 0.09 0.76 0.13 1.21 3.05 71 1.04
## mu[3,7] 2.64 0.12 0.87 1.26 2.53 4.58 52 1.05
## mu[3,8] 2.32 0.12 0.84 0.93 2.20 4.21 45 1.05
## mu[3,9] 2.66 0.12 0.88 1.20 2.56 4.63 52 1.06
## mu[3,10] 2.96 0.13 0.91 1.48 2.85 5.08 46 1.07
## mu[3,11] 3.25 0.14 0.96 1.74 3.13 5.34 48 1.08
## mu[3,12] 3.25 0.14 1.07 1.51 3.14 5.80 59 1.06
## mu[4,1] 0.44 0.02 0.42 0.01 0.30 1.50 550 1.01
## mu[4,2] 0.70 0.02 0.49 0.03 0.63 1.82 608 1.01
## mu[4,3] 0.77 0.04 0.52 0.05 0.68 1.97 216 1.03
## mu[4,4] 1.44 0.08 0.69 0.32 1.39 3.07 75 1.04
## mu[4,5] 1.56 0.09 0.73 0.35 1.48 3.31 65 1.04
## mu[4,6] 1.67 0.09 0.75 0.39 1.57 3.47 65 1.04
## mu[4,7] 1.66 0.11 0.80 0.32 1.58 3.46 56 1.06
## mu[4,8] 1.84 0.12 0.81 0.50 1.74 3.69 46 1.06
## mu[4,9] 1.84 0.12 0.87 0.37 1.75 3.81 55 1.05
## mu[4,10] 1.28 0.12 0.82 0.11 1.09 3.30 45 1.07
## mu[4,11] 1.58 0.15 0.97 0.18 1.40 3.86 42 1.08
## mu[4,12] 1.99 0.14 1.07 0.31 1.82 4.32 56 1.06
## s_mu[1,1] 0.98 0.03 0.60 0.11 0.90 2.34 356 1.01
## s_mu[1,2] 0.73 0.02 0.54 0.03 0.61 1.95 727 1.01
## s_mu[1,3] 0.72 0.01 0.54 0.03 0.63 2.05 1530 1.00
## s_mu[1,4] 0.73 0.02 0.54 0.03 0.64 1.99 890 1.01
## s_mu[1,5] 0.66 0.01 0.52 0.04 0.54 1.99 1515 1.01
## s_mu[1,6] 0.68 0.02 0.54 0.00 0.56 2.00 479 1.01
## s_mu[1,7] 0.66 0.01 0.53 0.03 0.54 1.98 1358 1.00
## s_mu[1,8] 0.65 0.02 0.58 0.03 0.50 2.09 669 1.01
## s_mu[1,9] 0.74 0.01 0.54 0.04 0.65 2.04 1783 1.00
## s_mu[1,10] 1.09 0.02 0.60 0.09 1.06 2.37 909 1.00
## s_mu[1,11] 0.72 0.03 0.54 0.04 0.60 1.97 415 1.01
## s_mu[1,12] 0.85 0.07 0.65 0.05 0.72 2.60 95 1.04
## s_mu[2,1] 0.99 0.03 0.59 0.11 0.92 2.32 427 1.01
## s_mu[2,2] 0.88 0.02 0.57 0.06 0.81 2.17 1044 1.00
## s_mu[2,3] 0.65 0.02 0.52 0.04 0.54 1.94 1085 1.01
## s_mu[2,4] 0.71 0.05 0.57 0.02 0.58 2.05 147 1.03
## s_mu[2,5] 0.64 0.01 0.50 0.03 0.52 1.90 1726 1.00
## s_mu[2,6] 0.63 0.01 0.51 0.03 0.50 1.89 1786 1.00
## s_mu[2,7] 0.63 0.01 0.51 0.04 0.49 1.90 1630 1.01
## s_mu[2,8] 0.77 0.05 0.59 0.04 0.64 2.15 154 1.03
## s_mu[2,9] 0.71 0.02 0.55 0.03 0.60 2.10 1047 1.00
## s_mu[2,10] 0.64 0.02 0.52 0.03 0.51 1.93 1163 1.00
## s_mu[2,11] 1.01 0.02 0.63 0.08 0.90 2.50 832 1.01
## s_mu[2,12] 0.73 0.04 0.55 0.03 0.60 2.01 228 1.02
## s_mu[3,1] 0.73 0.03 0.56 0.03 0.62 2.10 504 1.01
## s_mu[3,2] 0.66 0.01 0.52 0.03 0.55 1.95 1704 1.00
## s_mu[3,3] 0.70 0.01 0.51 0.04 0.61 1.91 1807 1.00
## s_mu[3,4] 0.66 0.04 0.54 0.03 0.51 1.87 162 1.03
## s_mu[3,5] 0.65 0.01 0.52 0.03 0.52 1.95 1460 1.00
## s_mu[3,6] 0.63 0.03 0.54 0.01 0.51 2.06 448 1.01
## s_mu[3,7] 1.19 0.03 0.61 0.24 1.13 2.60 359 1.01
## s_mu[3,8] 0.71 0.01 0.53 0.04 0.61 2.03 2365 1.00
## s_mu[3,9] 0.73 0.03 0.57 0.01 0.61 2.07 386 1.01
## s_mu[3,10] 0.71 0.02 0.56 0.04 0.58 2.12 699 1.00
## s_mu[3,11] 0.69 0.01 0.52 0.04 0.58 1.95 1232 1.01
## s_mu[3,12] 0.66 0.01 0.52 0.04 0.52 1.91 1529 1.00
## s_mu[4,1] 0.71 0.01 0.52 0.03 0.59 1.97 1653 1.00
## s_mu[4,2] 0.66 0.01 0.50 0.03 0.56 1.91 2426 1.00
## s_mu[4,3] 0.63 0.01 0.52 0.03 0.49 1.92 1562 1.00
## s_mu[4,4] 0.89 0.03 0.60 0.05 0.81 2.33 509 1.01
## s_mu[4,5] 0.66 0.01 0.51 0.04 0.56 1.90 1982 1.00
## s_mu[4,6] 0.67 0.04 0.55 0.03 0.53 2.09 165 1.02
## s_mu[4,7] 0.68 0.02 0.52 0.04 0.56 1.93 600 1.01
## s_mu[4,8] 0.66 0.01 0.53 0.03 0.52 1.96 1959 1.00
## s_mu[4,9] 0.66 0.02 0.54 0.04 0.52 1.97 694 1.01
## s_mu[4,10] 0.85 0.03 0.58 0.05 0.77 2.13 391 1.01
## s_mu[4,11] 0.72 0.02 0.55 0.03 0.61 2.06 920 1.00
## s_mu[4,12] 0.75 0.02 0.58 0.04 0.64 2.13 592 1.01
## s_pf[1,1] 1.03 0.02 0.32 0.49 0.99 1.69 320 1.01
## s_pf[1,2] 1.06 0.04 0.37 0.50 1.00 2.02 102 1.05
## s_pf[1,3] 1.03 0.01 0.31 0.50 0.99 1.73 1959 1.00
## s_pf[1,4] 0.99 0.02 0.33 0.45 0.95 1.71 279 1.02
## s_pf[1,5] 1.07 0.01 0.32 0.51 1.04 1.78 1054 1.01
## s_pf[1,6] 1.01 0.01 0.30 0.49 0.98 1.69 1513 1.01
## s_pf[1,7] 0.99 0.02 0.32 0.41 0.97 1.70 239 1.02
## s_pf[1,8] 1.08 0.01 0.34 0.51 1.03 1.86 728 1.01
## s_pf[1,9] 0.95 0.02 0.31 0.45 0.90 1.64 312 1.02
## s_pf[1,10] 1.01 0.01 0.33 0.47 0.98 1.71 590 1.01
## s_pf[1,11] 0.99 0.01 0.32 0.49 0.95 1.68 472 1.01
## s_pf[1,12] 1.02 0.03 0.34 0.49 0.97 1.81 147 1.03
## s_pf[2,1] 1.02 0.01 0.31 0.49 0.99 1.70 1272 1.00
## s_pf[2,2] 1.00 0.01 0.32 0.51 0.98 1.73 542 1.01
## s_pf[2,3] 1.04 0.02 0.33 0.50 1.00 1.73 258 1.02
## s_pf[2,4] 0.99 0.01 0.31 0.49 0.95 1.70 1401 1.00
## s_pf[2,5] 1.06 0.01 0.33 0.52 1.03 1.83 1064 1.01
## s_pf[2,6] 1.01 0.01 0.32 0.49 0.97 1.74 967 1.01
## s_pf[2,7] 0.95 0.01 0.29 0.45 0.93 1.59 1130 1.00
## s_pf[2,8] 1.04 0.01 0.32 0.53 1.00 1.78 1588 1.00
## s_pf[2,9] 0.96 0.01 0.31 0.48 0.93 1.63 463 1.01
## s_pf[2,10] 0.98 0.02 0.33 0.40 0.96 1.69 230 1.02
## s_pf[2,11] 0.98 0.01 0.31 0.45 0.94 1.66 563 1.01
## s_pf[2,12] 0.97 0.01 0.31 0.46 0.93 1.67 1106 1.00
## s_pf[3,1] 1.00 0.01 0.31 0.48 0.99 1.68 3702 1.00
## s_pf[3,2] 0.99 0.01 0.31 0.48 0.96 1.68 1973 1.00
## s_pf[3,3] 1.01 0.01 0.30 0.52 0.97 1.70 959 1.01
## s_pf[3,4] 1.06 0.01 0.32 0.53 1.02 1.78 1430 1.00
## s_pf[3,5] 1.06 0.01 0.32 0.53 1.03 1.78 1195 1.00
## s_pf[3,6] 0.98 0.01 0.30 0.46 0.96 1.65 1656 1.00
## s_pf[3,7] 0.99 0.01 0.31 0.48 0.97 1.69 1254 1.00
## s_pf[3,8] 1.06 0.01 0.33 0.53 1.02 1.79 708 1.00
## s_pf[3,9] 1.07 0.02 0.33 0.52 1.03 1.77 272 1.02
## s_pf[3,10] 0.99 0.01 0.31 0.49 0.96 1.69 1392 1.00
## s_pf[3,11] 1.03 0.01 0.31 0.51 0.99 1.71 834 1.01
## s_pf[3,12] 1.05 0.01 0.34 0.50 1.02 1.85 1000 1.01
## s_pf[4,1] 0.99 0.01 0.30 0.48 0.95 1.69 2305 1.00
## s_pf[4,2] 1.03 0.01 0.32 0.48 1.00 1.75 1748 1.00
## s_pf[4,3] 0.96 0.01 0.31 0.48 0.92 1.68 1055 1.01
## s_pf[4,4] 1.02 0.01 0.31 0.47 1.00 1.67 1028 1.01
## s_pf[4,5] 1.01 0.01 0.32 0.49 0.97 1.73 1305 1.01
## s_pf[4,6] 1.02 0.02 0.34 0.46 0.99 1.78 273 1.02
## s_pf[4,7] 1.04 0.01 0.32 0.52 1.00 1.72 803 1.01
## s_pf[4,8] 1.06 0.02 0.34 0.51 1.03 1.83 500 1.01
## s_pf[4,9] 1.04 0.01 0.32 0.49 1.01 1.76 2175 1.00
## s_pf[4,10] 0.89 0.01 0.27 0.43 0.86 1.50 1110 1.00
## s_pf[4,11] 1.03 0.01 0.31 0.50 1.00 1.67 500 1.01
## s_pf[4,12] 1.12 0.02 0.34 0.55 1.10 1.84 330 1.02
## lp__ -757.90 2.79 26.90 -806.92 -757.77 -702.84 93 1.03
##
## Samples were drawn using NUTS(diag_e) at Mon Jan 22 12:49:08 2024.
## For each parameter, n_eff is a crude measure of effective sample size,
## and Rhat is the potential scale reduction factor on split chains (at
## convergence, Rhat=1).
信用区間付きのグラフを作成するためにデータを加工する。
ms <- rstan::extract(fit_ts)
d_est <- data.frame()
for (n in 1:length(TARGET_PLAYERS)) {
qua <- apply(ms$mu[,n,], 2, quantile, prob = c(0.25, 0.5, 0.75))
d_est <- rbind(
d_est,
data.frame(name = TARGET_PLAYERS[n], year = unique(df_matches_ts$year), t(qua), check.names = FALSE)
)
}
# インデックスを年度に戻す
d_est$year <- d_est$year+2004
d_est
## name year 25% 50% 75%
## 1 Roger Federer 2005 0.3812064 0.8013155 1.2694142
## 2 Roger Federer 2006 0.6804838 1.0782213 1.5344621
## 3 Roger Federer 2007 1.0292751 1.4620772 1.9107606
## 4 Roger Federer 2008 0.7325013 1.1594233 1.5728845
## 5 Roger Federer 2009 0.9449952 1.3695933 1.7813726
## 6 Roger Federer 2010 1.2221332 1.6279073 2.1217988
## 7 Roger Federer 2011 1.0735521 1.5064182 2.0760527
## 8 Roger Federer 2012 1.1879969 1.6301511 2.2318546
## 9 Roger Federer 2013 0.8700894 1.3992972 1.9811115
## 10 Roger Federer 2014 1.8832882 2.4928276 3.1288272
## 11 Roger Federer 2015 2.0577923 2.6904517 3.5143931
## 12 Roger Federer 2016 1.7052849 2.4814313 3.4347824
## 13 Rafael Nadal 2005 0.3271594 0.8317259 1.4338040
## 14 Rafael Nadal 2006 1.1783340 1.6200811 2.0334921
## 15 Rafael Nadal 2007 1.3797857 1.7682153 2.1768405
## 16 Rafael Nadal 2008 1.5815267 2.0094313 2.5510075
## 17 Rafael Nadal 2009 1.4461991 1.8205093 2.3595890
## 18 Rafael Nadal 2010 1.4877460 1.9125200 2.4359122
## 19 Rafael Nadal 2011 1.4931660 1.9118399 2.4914173
## 20 Rafael Nadal 2012 1.7422694 2.1885436 2.8397218
## 21 Rafael Nadal 2013 2.0235356 2.5830336 3.2205655
## 22 Rafael Nadal 2014 1.8893407 2.4767535 3.1680054
## 23 Rafael Nadal 2015 1.0010080 1.6053488 2.2464954
## 24 Rafael Nadal 2016 0.8971358 1.5257338 2.2125323
## 25 Novak Djokovic 2005 0.1274458 0.3741919 0.7776737
## 26 Novak Djokovic 2006 0.3362948 0.6699180 1.0188917
## 27 Novak Djokovic 2007 0.6357918 0.9881388 1.4259269
## 28 Novak Djokovic 2008 0.6959920 1.0701150 1.5041352
## 29 Novak Djokovic 2009 0.8319397 1.2809576 1.7450998
## 30 Novak Djokovic 2010 0.7470623 1.2079023 1.7216725
## 31 Novak Djokovic 2011 1.9736438 2.5318767 3.1879375
## 32 Novak Djokovic 2012 1.7355753 2.2044294 2.8113345
## 33 Novak Djokovic 2013 2.0442441 2.5562056 3.1625121
## 34 Novak Djokovic 2014 2.3156277 2.8497007 3.4728606
## 35 Novak Djokovic 2015 2.5137765 3.1287830 3.7645801
## 36 Novak Djokovic 2016 2.4672540 3.1420639 3.8568938
## 37 Andy Murray 2005 0.1057661 0.3004807 0.6590663
## 38 Andy Murray 2006 0.3162545 0.6270979 0.9825874
## 39 Andy Murray 2007 0.3503544 0.6790839 1.0896359
## 40 Andy Murray 2008 0.9335426 1.3855212 1.8522114
## 41 Andy Murray 2009 1.0019090 1.4768981 1.9945328
## 42 Andy Murray 2010 1.1538676 1.5707676 2.1074787
## 43 Andy Murray 2011 1.0932566 1.5811892 2.1912661
## 44 Andy Murray 2012 1.2510475 1.7430901 2.3026892
## 45 Andy Murray 2013 1.2186947 1.7546021 2.3413963
## 46 Andy Murray 2014 0.6688713 1.0907513 1.7386169
## 47 Andy Murray 2015 0.8545327 1.4000433 2.1327402
## 48 Andy Murray 2016 1.2354040 1.8156072 2.6511893
各選手の2005年から2016年までの強さの推移を可視化すると、
ただ、フェデラー選手に関しては、2016年は試合に出ていないため、状態空間モデルのように強さ\(\mu\)の状態方程式が機能している。
c <- ggplot(data = d_est, aes(x = year, y = `50%`, group = name)) +
theme_bw(base_size = 10) +
theme(legend.position = 'none') +
geom_ribbon(aes(ymin = `25%`, ymax = `75%`, fill = name), alpha = 0.2) +
geom_line(aes(col = name), linewidth = 0.5) +
geom_hline(yintercept = 2, linetype = 'dashed') +
labs(x = 'Year', y = 'Strength', title = 'Time Series of Estimated Latent Strength') +
scale_x_continuous(breaks = seq(2005, 2016, 1)) +
scale_y_continuous(breaks = seq(0,4,0.5), limit = c(0, 4)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
facet_wrap( ~ name, nrow = 1)
a / b / c