Question: Question 1 Let's begin by running a multiple regression with MSRP as the y variable and the other three variables as our predictors, and store
Question 1
Let's begin by running a multiple regression with MSRP as the y variable and the other three variables as our predictors, and store it in an object called lm.MSRP.
What is the multiple R-squared values of this model? Your answer should be reported to the ten-thousandth place. For example 0.1234
Question 2
Use the fitted equation to predict the price of a hybrid car with 40 mpg, acceleration of 8 km/hr/sec, and model year 2007.
Question 3
Unfortunately, if you were to test this model against the assumptions of a multiple regression model, you would find that the residual plot reveals pathological curvature, heteroscedasticity is evident in multiple plots, and residuals also appear to not be normally distributed.
Nevertheless, Since we're dealing with prices, it might be more natural to think on the log-scale. Let's define lmsrp = log(msrp) as the base-e logarithm of the MSRP. The impact of miles per gallon may also be multiplicative, so we'll also define lmpg = log(mpg). We'll proceed with our regression analysis using these transformed variables. Noe thatthe assumptions of the multiple regression model hold well with this logtransformed response variable.
Let's first fit a simple regression with lmsrp as the y variable and lmgp as the single predictor variable.
First, what is the slope coefficient from this simple regression?
Question 4
Interpret the slope coefficient from this simple regression in terms of percent changes in x and/or y as appropriate.
Question 5
Compare the p-values reported by R for the slope coefficient to the p-value it reports for the Overall F-test. Now, square the t-statistic reported by R for the slope coefficient and compare it to the F-statistic. Notice anything? Describe how this is logically sensible behavior in light of the null hypotheses being tested by these two tests in the case of simple regression.
Question 6
Now, let's run a multiple regression with lmsrp as the y variable and lmgp, year, and accelerate as the predictors. Again, you can proceed as though the assumptions of the multiple regression model hold well with this log-transformed response variable.
What is the RMSE of this new model?
Helpful code: RMSE = summary(log.lm.msrp)$sigma
Answer choice:
.3404271
.3505271
.3303271
.3202271
.3101271
.3000271
.3606271
.3707271
.3808271
.3909271
Question 7
Interpret the slope coefficient on the variable lmgp in this multiple regression analysis. How does the interpretation differ from that in Question 4?
Question 8
Is there evidence that a model containing year, lmpg, and accelerate provides a substantial improvement in predictive performance relative to a model that only includes lmpg and accelerate? Conduct your test at ? = 0.05.
Question 9
It may be the case that sign of the slope coefficient on lmgp differs from what you would have expected. Any ideas as to what might be going on here? (this is quite open ended so most anything would be fine. I'd just like you to think critically about this).
View keyboard shortcuts
EditViewInsertFormatToolsTable
dataset CSV file available in this link, please help me with R programming





vehicle year msrp accelerate mpg 1 Prius (1st Gen) 1997 24509.74 7.46 41.26 2 Tino 2000 35354.97 8.20 54.10 Prius (2nd Gen) 2000 26832.25 7.97 45.23 4 Insight 2000 18936.41 9.52 53.00 5 Civic (1st Gen) 2001 25833.38 7.04 47.04 6 Insight 2001 19036.71 9.52 53.00 7 Insight 2002 19137.01 9.71 53.00 8 Alphard 2003 38084.77 8.33 40.46 9 Insight 2003 19137.01 9.52 53.00 10 Civic 2003 14071.92 8.62 41.00 11 Escape 2004 36676.10 10.32 31.99 12 Insight 2004 19237.31 9.35 52.00 13 Prius 2004 20355.64 9.90 46.00 14 Silverado 15 2WD 2004 30089.64 9.09 17.00 15 Lexus RX400h 2005 58521.14 12.76 28.23 16 Civic (2nd Gen) 2005 26354.44 7.63 39.99 17 Highlander 2005 29186.21 12.76 29.40 18 Insight 2005 19387.76 9.71 52.00 19 Civic 2005 18236.33 8.26 41.00 20 Escape 2WD 2005 19322.56 9.52 29.00 21 Accord 2005 16343.69 14.93 28.00 22 Silverado 15 2WD 2005 32647.26 11.11 17.00 23 Mercury Mariner 2006 34772.40 8.98 32.93 24 Camry 2006 29853.25 11.28 33.64 25 Lexus G5450h 2006 64547.56 18.65 33.40 26 Estima 2006 36012.70 9.26 47.04 27 Altima 2006 29524.75 13.29 32.93 28 Chevrolet Tahoe 2007 42924.35 10.91 22.35 29 Kluger 2007 46229.48 12.76 25.87vehicle year msrp accelerate mpg 30 Lexus LS600h/hL 2007 118543.60 17.54 21.00 31 Tribute 2007 24823.83 11.28 31.75 32 GMC Yukon 2007 57094.81 12.28 21.78 33 Aura 2007 22110.87 10.87 27.00 34 Vue 2007 22938.33 10.75 26.00 35 Silverado 15 2WD 2007 34653.23 11.49 17.00 36 Crown 2008 62290.38 8.70 37.16 37 Cadillac Escalade 2008 78932.81 9.09 22.35 38 F3DM 2008 23744.06 9.52 30.11 39 Altima 2008 18675.63 13.70 34.00 40 A5 BSG 2009 11849.43 7.87 35.28 41 Lexus RX450h 2009 46233.36 13.47 31.99 42 ML450 Blue HV 2009 60519.83 12.60 23.99 43 Prius (Brd Gen) 2009 24641.18 9.60 47.98 44 5400 Long 2009 96208.93 13.89 26.34 45 Mercury Milan 2009 30522.57 11.55 40.69 46 Lexus H5250h 2009 38478.15 11.55 54.10 47 Avante/Elantra LPI 2009 21872.71 10.21 41.87 48 ActiveHybrid X6 2009 97237.90 17.96 18.82 49 SAI 2009 39172 44 11.55 54.10 50 Malibu 2009 24768.79 9.09 29.00 51 Vue 2009 26408.67 13.70 28.00 Aspen HEV 2009 44903.77 13.51 21.00 53 Durango 2009 41033.24 8.33 21.00 54 Auris HSD 2010 35787.29 8.85 68.21 55 CR-Z 2010 21435.54 9.24 37.00 56 F3DM PHEV 2010 23124.59 9.24 30.15 57 Touareg 2010 64198.95 15.38 28.70 58 Audi Q5 2010 37510.86 14.08 33.64 59 Jeep Patriot 2010 17045.06 12.05 29.40 60 Bestum B50 2010 14586.61 7.14 31.28 61 ActiveHybrid 7 2010 104300.43 20.41 22.11 62 Lincoln MKZ 2010 37036.64 11.15 37.63 63 Fit/Jazz 2010 16911.85 8.26 30.00 64 Sonata 2010 28287.66 14.70 37.00 65 Cayenne 5 2010 73183.47 14.71 26.117 Filter vehicle year msrp accelerate mpg 66 Insight 2010 19859.16 9.17 41.00 67 Fuga Infiniti M35H 2010 70157.02 18.65 33.64 68 Chevrolet Volt 2010 42924.35 10.78 35.00 69 Tribute 4WD 2010 27968.32 12.35 29.00 70 Fusion FWD 2010 28033.51 11.49 39.00 71 H5 250h 2010 34753.53 11.76 35.00 72 Mariner FWD 2010 30194.95 11.63 32.00 73 RX 450h 2010 42812.54 13.89 30.00 74 ML450 4natic 2010 55164.33 12.99 22.00 75 Silverado 15 2WD 2010 38454.56 11.76 22.00 76 5400 2010 88212.78 12.99 21.00 77 Aqua 2011 22850.87 9.35 50.00 78 Lexus CT200h 2011 30082.16 9.71 42.00 79 Civic (3rd Gen) 2011 24999.59 9.60 44.36 80 Prius alpha (V) 2011 30588.35 10.00 72.92 81 3008 2011 45101.54 11.36 61.16 82 Fit Shuttle 2011 16394.36 7.52 58.80 83 Buick Regal 2011 27948.93 12.05 25.99 84 Prius V 2011 27272.28 9.51 32.93 85 Freed/Freed Spike 2011 27972.07 6.29 50.81 86 Optima K5 2011 26549.16 10.54 36.00 87 Escape FWD 2011 30661.34 12.35 32.00 88 Insight 2011 18254.38 9.52 41.00 89 MKZ FWD 2011 34748.52 11.49 39.00 90 CR-Z 2011 19402.80 12.20 37.00 91 Sonata 2011 25872.07 11.90 36.00 Camry 2011 27130.82 13.89 33.00 93 Tribute 2WD 2011 26213.09 12.50 32.00 94 Cayenne 5 2011 67902.28 18.52 21.00 95 Touareg 2011 50149.39 16.13 21.00 96 ActiveHybrid 7i 2011 102605.66 18.18 20.00 97 Prius C 2012 19006.62 9.35 50.00 98 Prius PHV 2012 32095.61 8.82 50.00 99 Ampera 2012 31739.55 11.11 37.00 100 ActiveHybrid 5 2012 62180.23 16.67 26.00 101 Lexus G5450h 2012 59126.14 16.95 31.00vehicle year msrp accelerate mpg 102 Insight 2012 18555.28 9.42 42.00 103 Chevrolet Volt 2012 39261.96 11.11 37.00 104 Camry LE 2012 26067.66 13.16 41.00 105 MKZ FWD 2012 34858.84 11.49 39.00 106 M35h 2012 53860.45 19.23 29.00 107 LaCrosse 2012 30049.52 11.36 29.00 108 ActiveHybrid 5 2012 61132.11 17.54 26.00 Panamera 5 2012 95283.85 17.54 25.00 110 Yukon 1500 2012 52626.77 13.50 21.00 111 Prius C 2013 19080.00 8.70 50.00 112 Jetta 2013 24995.00 12.66 45.00 113 Civic 2013 24360.00 10.20 44.00 114 Prius 2013 24200.00 10.20 50.00 115 Fusion FWD 2013 27200.00 11.72 47.00 116 C-Max FWD 2013 25200.00 12.35 43.00 117 Insight 2013 18600.00 11.76 42.00 118 Camry LE 2013 26140.00 13.51 41.00 119 Camry LXLE 2013 27670.00 13.33 40.00 120 Sonata 2013 25650.00 11.76 38.00 121 Optima 2013 25900.00 11.63 38.00 122 Sonata Limited 2013 30550.00 11.76 37.00 123 Optima EX 2013 31950.00 11.36 37.00 124 Malibu 2013 24985.00 11.49 29.00 125 LaCrosse 2013 31660.00 11.36 29.00 126 Regal 2013 29015.00 12.20 29.00 127 RX 450h 2013 46310.00 12.99 30.00 128 Highlander 4WD 2013 40170.00 13.89 28.00 129 05 2013 50900.00 14.71 26.00 130 Cayenne 5 2013 69850.00 16.39 21.00 131 Touareg 2013 62575.00 16.13 21.00 132 Escalade 2WD 2013 74425.00 11.63 21.00 133 Tahoe 2WD 2013 53620.00 11.90 21.00 134 Yukon 1500 2013 54145.00 11.88 21.00 135 Yukon 1500 2013 61960.00 13.33 21.00 136 MKZ FWD 2013 35925.00 14.03 45.00 137 CT 200h 2013 32050.00 10.31 42.00138 ES 300h 2013 39250.00 12.35 40.00 139 ILX 2013 28900.00 9.26 38.00 140 ActiveHybrid 3 2013 49650.00 14.93 28.00 141 Silverado 15 2WD 2013 41135.00 12.35 21.00 142 Sierra 15 2WD 2013 41555.00 10.00 21.00 143 G5 450h 2013 59450.00 16.67 31.00 144 M35h 2013 54750.00 19.61 29.00 145 E400 2013 55800.00 14.93 26.00 146 ActiveHybrid 5 2013 61400.00 12.99 26.00 147 ActiveHybrid 7L 2013 84300.00 18.18 25.00 148 Panamera 5 2013 96150.00 18.52 25.00 149 5400 2013 92350.00 13.89 21.00 150 Prius Plug-in 2013 32000.00 9.17 50.00 151 C-Max Energi Plug-in 2013 32950.00 11.76 43.00 152 Fusion Energi Plug-in 2013 38700.00 11.76 43.00 153 Chevrolet Volt 2013 39145.00 11.11 37.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
