Question
Question 9 has two parts. Use the information below to answer both parts.Use theTeamsdata frame from the Lahman package. Fit a multivariate linear regression model
Question 9 has two parts. Use the information below to answer both parts.Use theTeamsdata frame from the
Lahmanpackage. Fit a multivariate linear regression model to obtain the effects of BB and HR on Runs (R) in 1971. Use thetidy()function in thebroompackage to obtain the results in a data frame.
Question 9a
1.What is the estimate for the effect of BB on runs?
2.What is the estimate for the effect of HR on runs?
Question 9b
Interpret the p-values for the estimates using a cutoff of 0.05.
Which of the following is the correct interpretation?
1.Both BB and HR have a nonzero effect on runs.
2.HR has a significant effect on runs, but the evidence is not strong enough to suggest BB also does.
3.BB has a significant effect on runs, but the evidence is not strong enough to suggest HR also does.
4.Neither BB nor HR have a statistically significant effect on runs.
Question 10
Repeat the above exercise to find the effects of BB and HR on runs (R) for every year from 1961 to 2018 usingdo()and thebroompackage.
Make a scatterplot of the estimate for the effect of BB on runs over time and add a trend line with confidence intervals.
Fill in the blank to complete the statement:
The effect of BB on runs has(increased or decreased remained the same) over time
Question 11
Fit a linear model on the results from Question 10 to determine the effect of year on the impact of BB.
- For each additional year, by what value does the impact of BB on runs change?
- What is the p-value for this effect?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started