Zum Hauptinhalt springen

41  skalenniveau2

Schlüsselwörter

Aufgaben, Statistik, Prognose, Modellierung, R, Datenanalyse, Regression

Betrachten Sie den Auszug aus dem Datensatz PitchingPost. Der Datensatz hat folgenden Titel: PitchingPost table.

rownames playerID yearID round teamID lgID W L G GS CG SHO SV IPouts H ER HR BB SO BAOpp ERA IBB WP HBP BK BFP GF R SH SF GIDP
1 becanbu01 1884 WS NY4 AA 0 1 1 1 1 0 0 18 9 7 0 2 1 NA 10.50 NA NA NA NA NA 0 12 NA NA NA
2 keefeti01 1884 WS NY4 AA 0 2 2 2 2 0 0 45 10 6 1 3 12 NA 3.60 NA NA NA NA NA 0 9 NA NA NA
3 radboch01 1884 WS PRO NL 3 0 3 3 3 1 0 66 11 0 0 0 17 NA 0.00 NA NA NA NA NA 0 3 NA NA NA
4 carutbo01 1885 WS SL4 AA 1 1 3 3 3 0 0 78 25 7 1 4 16 NA 2.42 NA NA NA NA NA 0 18 NA NA NA
5 clarkjo01 1885 WS CHN NL 0 1 2 2 2 0 0 48 15 2 0 1 15 NA 1.13 NA NA NA NA NA 0 14 NA NA NA
6 foutzda01 1885 WS SL4 AA 2 2 4 4 4 0 0 87 30 2 1 9 14 NA 0.62 NA NA NA NA NA 0 20 NA NA NA

Hier folgt eine Beschreibung des Datensatzes:


41.1 BEGINN BESCHREIBUNG DES DATENSATZES

<!DOCTYPE html> R: PitchingPost table
PitchingPost R Documentation

PitchingPost table

Description

Post season pitching statistics

Usage

data(PitchingPost)

Format

A data frame with 7474 observations on the following 30 variables.

playerID

Player ID code

yearID

Year

round

Level of playoffs

teamID

Team; a factor

lgID

League; a factor with levels AA AL NL

W

Wins

L

Losses

G

Games

GS

Games Started

CG

Complete Games

SHO

Shutouts

SV

Saves

IPouts

Outs Pitched (innings pitched x 3)

H

Hits

ER

Earned Runs

HR

Homeruns

BB

Walks

SO

Strikeouts

BAOpp

Opponents’ batting average

ERA

Earned Run Average

IBB

Intentional Walks

WP

Wild Pitches

HBP

Batters Hit By Pitch

BK

Balks

BFP

Batters faced by Pitcher

GF

Games Finished

R

Runs Allowed

SH

Sacrifice Hits allowed

SF

Sacrifice Flies allowed

GIDP

Grounded into Double Plays

Source

Lahman, S. (2026) Lahman’s Baseball Database, 1871-2025, 2026 version, https://sabr.org/lahman-database/

Examples

library("dplyr")
library(ggplot2)

# Restrict data to World Series in modern era
ws <- PitchingPost %>%
         filter(yearID >= 1903 & round == "WS")
# Pitchers with ERA 0.00 in WS play (> 10 IP)
ws %>%
  filter(IPouts > 30 & ERA == 0.00) %>%
  arrange(desc(IPouts)) %>%
  select(playerID, yearID, teamID, lgID, IPouts, W, L, G, 
         CG, SHO, H, R, SO, BFP) 

# Pitchers with the most IP in a series 
# 1903 Series went eight games - for details, see
# https://en.wikipedia.org/wiki/1903_World_Series
ws %>%
  arrange(desc(IPouts)) %>%
  select(playerID, yearID, teamID, lgID, IPouts, W, L, G, 
         CG, SHO, H, SO, BFP, ERA) %>%
  head(., 10)

# Pitchers with highest strikeout rate in WS
# (minimum 20 IP)
ws %>%
  filter(IPouts >= 60) %>%
  mutate(K_rate = 27 * SO/IPouts) %>%
  arrange(desc(K_rate)) %>%
  select(playerID, yearID, teamID, lgID, IPouts, 
         H, SO, K_rate) %>%
  head(., 10)
  
# Pitchers with the most IP in WS history
ws %>%
  group_by(playerID) %>%
  summarise_at(vars(IPouts, H, ER, CG, BB, SO, W, L), 
               sum, na.rm = TRUE) %>%
  mutate(ERA = round(27 * ER/IPouts, 2),
         Kper9 = round(27 * SO/IPouts, 3),
         WHIP = round(3 * (H + BB)/IPouts, 3)) %>%
  arrange(desc(IPouts)) %>%
  select(-H, -ER) %>%
  head(., 10)

# Plot of K/9 by year
ws %>%
  group_by(yearID) %>%
  summarise(Kper9 = 27 * sum(SO)/sum(IPouts)) %>%
  ggplot(., aes(x = yearID, y = Kper9)) +
    geom_point() +
    geom_smooth() +
    labs(x = "Year", y = "K per 9 innings")

41.2 ENDE BESCHREIBUNG DES DATENSATZES


Welches Skalenniveau hat die Variable W?

Wählen Sie aus dieser Liste das Skalenniveau aus, das am besten passt:

integer, character, numeric, binary, ordered factor, factor, date, logical

Hinweis: Geben Sie den Namen des Skalenniveaus exakt so ein, wie in der Liste ersichtlich, da ansonsten die Eingabe u.U. nicht als korrekt gewertet werden kann.

Das Skalenviveau der Variablen W lautet integer.

Aufgabenname: skalenniveau2