Homework 3
STAT 462: Summer 2019
Note: This homework focuses on types of explanatory variables. It is worth 30 points. You are free to discuss answers with your classmates. However, your submission must be written independently and reflect you own understanding of the topics.
This homework is due before class starts on Wednesday, July 31st. You will not need to use R for this homework. We will keep this one quite short!
Part A:
We are going to re-visit the used Cars dataset. It contains the variables below.
PricePrice of the car
Miles# miles driven
MakeMake of the car; 6 possible compnies
ModelModel of the car
TrimTrim of car
TypeType of car: Convertible, Coupe, Hatchback, Sedan, Wagon
Cylinder# cylinders: 4, 6, or 8
LiterFuel capacity in liters
Doors# of doors on the car: 2 or 4
CruiseWhether the car has cruise control or not
SoundWhether there is a sound system or not
LeatherWhether the car has leather fixings or not
We performed multiple linear regression analysis on price (Y) and Miles, Type, Cylinders (as a quantitative variable), Liter, Cruise, Sound, and Leather; where we are considering an interaction between the Miles and Cruise variables. Below is the R output:
1)(2 pts) Based on this output, can we find the sample size (n)? How many observations are in the sample data? How did you calculate it?
2)(3 pts) Write down the population regression equation.
3)(3 pts) Write down the estimated sample regression equation.
4)(6 pts) Write down the indicator variables describing the Cylinder variable. First consider how many indicators there will be. Then, write them down fully.
5)Interpret the below coefficients:
a.(2 pts) Miles
b.(2 pts) Cruise
c.(2 pts) Miles:Cruise
The question below is separate from the ones above; it does not pertain to the R output presented above.
(10 points) Suppose that we were fitting a simple model. The response variable is Price and the explanatory variables are Miles, Cruise, an interaction between them. Write down the design matrix for this regression, without the actual numbers. Remember, you don’t need to have 804 rows in your matrix. Just write the first 3.
版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。