Question
First, run the following code in the R Console. The update function takes an existing fitted model and updates it. The notation . ~ .
First, run the following code in the R Console. The update function takes an existing fitted model and
updates it. The notation . ~ . + var means keep the existing response and regressors but add var to the
model.
# fit model with an intercept
lmod1
summary(lmod1)$r.squared
# fit model with an intercept and lcavol
lmod2
summary(lmod2)$r.squared
# fit model with an intercept, lcavol, and lweight
lmod3
summary(lmod3)$r.squared
# fit model with an intercept, lcavol, lweight, and age
lmod4
summary(lmod4)$r.squared
lmod5
summary(lmod5)$r.squared
lmod6
summary(lmod6)$r.squared
lmod7
summary(lmod7)$r.squared
lmod8
summary(lmod8)$r.squared
lmod9
summary(lmod9)$r.squared
(a)
Complete a table with the results from the code above with the following format. Replace x with the R2
value from the fitted model.
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