先発→救援の指標の変化
投手は一般的に救援より先発のほうが難しいとされている。実際に先発と救援ではどの程度成績に変化があるのだろうか。
検証方法
NPBでの先行研究に倣い同一シーズンで先発と救援の両方で30打者以上投げた選手に対し成績の差を出し少ない方の打席数で加重し平均をとる。
結果
救援だとBB%を除くとほとんどの指標が改善される。これはNPBの先行研究と一致した結果となっている。
#dfには2017-2020年のstatcastデータが入っている。
#投球結果の列を作る
strikeouts <- c("strikeout", "strikeout_double_play")
df <- df %>%
mutate(K_FL = ifelse(events %in% strikeouts, 1, 0),
BB_FL = ifelse(events == "walk",1,0),
HR_FL = ifelse(events == "home_run",1,0),
)
#先発投手を抽出して結合
player_Top <- df %>%
filter(inning_topbot == "Top")%>%
group_by(game_pk,pitcher)%>%
filter(at_bat_number == min(at_bat_number))%>%
filter(pitch_number == min(pitch_number))%>%
select(game_pk,at_bat_number,pitch_number)
SP_Top <- player_Top %>%
group_by(game_pk)%>%
filter(at_bat_number == min(at_bat_number))%>%
filter(pitch_number == min(pitch_number))%>%
mutate(Top_SP = "SP")%>%
select(pitcher,game_pk,Top_SP)
df <- left_join(df,SP_Top)
player_Bot <- df %>%
filter(inning_topbot == "Bot")%>%
group_by(game_pk,pitcher)%>%
filter(at_bat_number == min(at_bat_number))%>%
filter(pitch_number == min(pitch_number))%>%
select(game_pk,at_bat_number,pitch_number)
SP_Bot <- player_Bot %>%
group_by(game_pk)%>%
filter(at_bat_number == min(at_bat_number))%>%
filter(pitch_number == min(pitch_number))%>%
mutate(Bot_SP = "SP")%>%
select(pitcher,game_pk,Bot_SP)
df <- left_join(df,SP_Bot)
#先発・救援の列を作る
df <- df %>%
mutate(P_POS = case_when(
Top_SP == "SP" ~ "SP",
Bot_SP == "SP" ~ "SP",
TRUE ~ "RP"
))
#先発・救援成績を算出
SP_Stats <- df %>%
filter(P_POS == "SP") %>%
group_by(game_year,pitcher) %>%
dplyr::summarise(SP_N = n(),
SP_PA = sum(woba_denom ,na.rm = TRUE),
SP_Kpct = round(sum(K_FL,na.rm=TRUE)/SP_PA*100,1),
SP_BBpct = round(sum(BB_FL,na.rm = TRUE) / SP_PA * 100,1),
SP_HRpct = round(sum(HR_FL,na.rm=TRUE)/SP_PA*100,1),
SP_wOBA = round(sum(woba_value,na.rm=TRUE)/SP_PA,3)) %>%
filter(SP_PA >= 30)
RP_Stats <- df %>%
filter(P_POS == "RP") %>%
group_by(game_year,pitcher) %>%
dplyr::summarise(RP_N = n(),
RP_PA = sum(woba_denom ,na.rm = TRUE),
RP_Kpct = round(sum(K_FL,na.rm=TRUE)/RP_PA*100,1),
RP_BBpct = round(sum(BB_FL,na.rm=TRUE)/RP_PA*100,1),
RP_HRpct = round(sum(HR_FL,na.rm=TRUE)/RP_PA*100,1),
RP_wOBA = round(sum(woba_value,na.rm=TRUE)/RP_PA,3))%>%
filter(RP_PA >= 30)
SP_RP_Stats_diff <- inner_join(SP_Stats,RP_Stats)
write_csv(SP_RP_Stats_diff,"先発 救援.csv")
SP_Stats_con <- df %>%
filter(P_POS == "SP") %>%
filter(type == "X")%>%
group_by(game_year,pitcher) %>%
dplyr::summarise(SP_PA = sum(woba_denom ,na.rm = TRUE),
SP_wOBA = round(sum(woba_value,na.rm=TRUE)/SP_PA,3)) %>%
filter(SP_PA >= 30)
RP_Stats_con <- df %>%
filter(P_POS == "RP") %>%
filter(type == "X")%>%
group_by(game_year,pitcher) %>%
dplyr::summarise(RP_PA = sum(woba_denom ,na.rm = TRUE),
RP_wOBAcon = round(sum(woba_value,na.rm=TRUE)/RP_PA,3))%>%
filter(RP_PA >= 30)
SP_RP_Stats_con_diff <- inner_join(SP_Stats_con,RP_Stats_con)
write_csv(SP_RP_Stats_con_diff,"先発 救援_con.csv")
この記事が気に入ったらサポートをしてみませんか?