Question: oas Note that the same variable can play different roles! Take a quick look at the variable 'cylinders', try to use this variable in the


oas Note that the same variable can play different roles! Take a quick look at the variable 'cylinders', try to use this variable in the following analyses wisely. We all agree that larger number of cylinder will lower mpg. However, we can interpret \"cylinders' as either a continuous [numeric] variable or a categorical variable. i. Fit a model, that treats 'cylinders' as a continuous ,r'numeric variable: "lm[mpg .... horsepower + cylinders. ISLRsAutoT. Is 'cylinders' signicant at the lll level? What effect does 'cylinders' play in this model? ii. Fit a model that treats \"cylinders" as a categorical;r factor variable: 'lm[mpg w horsepower + as.factor[cylinders], ISLE: :Auto]". Is "Cylinders' signicant at the .31 level? 1What is the effect of 'cylinders' in this model? iii. 1What are the fundamental differences bemeen treating \"cylinders\" as a numeric or a factor? Use \"anovalCtl. tEI' to help gauge the effect. Explain their difference
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
