(2) Load package \"alr3\" into R. Dataset fuel2001 contains data on motor fuel c
ID: 3066544 • Letter: #
Question
(2) Load package "alr3" into R. Dataset fuel2001 contains data on motor fuel con- tollowing columns. Drives: Number of Licensed drivers in the state . FuelC: Gasoline sold for road use (1000s of gal.) Income: Per capita personal income (year 2000) . Miles: Miles of Federal-aid highway miles in the state . MPC: Estimated miles driven per capita Pop: Population age 16 and over . Tax: Gasoline state tax rate, cents per gallon Transform the following variables to create: Dlic-1000 Drivers/Pop, . Fuel-1000 FuelC/Pop Income-Income/1000 . log.miles-log(Miles)Explanation / Answer
library(alr3)
d=fuel2001
Dlic=1000*(d$Drivers)/(d$Pop)
Fuel=1000*(d$FuelC)/(d$Pop)
Income=(d$Income)/1000
log.Miles=log(d$Miles)
Tax=d$Tax
reg=lm(Fuel~Tax+Dlic+Income+log.Miles)
summary(reg)
vcov(reg)
a)Estimates of beta:
Estimate
(Intercept) 154.1928
Tax -4.2280
Dlic 0.4719
Income -6.1353
log.Miles 26.7552
Sigma^2=4210.712
b)
(Intercept) Tax Dlic Income log.Miles
(Intercept) 37988.41145 -120.0960793 -17.18034682 -251.85813715 -1.173392e+03
Tax -120.09608 4.1213916 0.02357820 0.17952544 9.734094e-01
Dlic -17.18035 0.0235782 0.01651570 0.05006761 3.281593e-02
Income -251.85814 0.1795254 0.05006761 4.81202826 6.076250e+00
log.Miles -1173.39232 0.9734094 0.03281593 6.07625002 8.718655e+01
e)Multiple R-squared: 0.5105(R^2)
, Adjusted R-squared: 0.4679 (R^2(a))
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.