Question: Fit and interpret a linear model using the Teams table in the publicly available Lahman baseball database. You can follow the link and download the

Fit and interpret a linear model using the Teams table in the publicly available Lahman baseball database. You can follow
the link and download the .csv files; once you download the zipped folder, you can find the file by following:
baseballdatabank core Teams.csv. If you are using R, it might be more convenient to install the Lahman package
and load the teams dataframe:
install.packages("Lahman")
library(Lahman)
teams = Teams
We are going to model how run differential impacts the number of games a team will win in a single season. Start by
creating a new variable for run differential, which is the number of runs scored minus the number of runs allowed:
R_diff = R - RA. Next, fit a simple linear model where the dependent variable is wins (W) and the independent variable is
run differential. Only use data from seasons after 1970. You may take any additional steps you deem appropriate to
clean the data. Please answer the following questions and share any code or output you used to formulate your
responses.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!