Answered step by step
Verified Expert Solution
Question
1 Approved Answer
price ggplot (diamonds, aes (x-carat, y-price, color-clarity)) + geom_point () +geom_smooth() 20000- 15000- 10000- 5000- 0- carat clarity = VVS2 VVS1 Do any of
price ggplot (diamonds, aes (x-carat, y-price, color-clarity)) + geom_point () +geom_smooth() 20000- 15000- 10000- 5000- 0- carat clarity = VVS2 VVS1 Do any of these plots suggest a non-linear (e.g., quadratic or cubic) function in carat? g. In the model selected by stepwise selection you have interaction between carat and several other variables. Change the linear effect of carat to a polynomial and select the degree of the polynomial by cross validation. What degree do you select? You can recycle most of the CV code from the Chapter 4 section 4.1-4.3 exercises, but replace the call to glm() fit with one that includes the all the models terms of interest: fit
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