首页 > > 详细

TRY 4030 - Fall 2018 - Homework 4 Q2

TRY 4030 - Fall 2018 - Homework 4 Q2
Put Your Name and NetID Here
Due Friday, November 9, 2018
Instructions:
Create your homework solution file by editing the “hw4-2018_q2.Rmd” Rmarkdown file provided. Your
solution to this homework assignment should include the relevant R code and output (fit summaries, ANOVA
tables and computed statistics, as well as requested plots) in addition to written comments where requested.
Do not include output that is not relevant to the question. You should turn in a .pdf version of your compiled
code.
You may discuss the homework problems and computing issues with other students in the class. However, you
must write up your homework solution on your own. In particular, do not share your homework RMarkdown
file with other students.
Here we will illustrate the results from Question 1 with a real world data set. We will use the study of
mortality in 55 US cities as it is influenced by pollutants NOX (nitrous oxide) and SO2 (sulfur dioxide), while
controlling weather (PRECIP) and sociological variables (EDUC and NONWHITE) that appeared on the
midterm. In this case we will be interested in the sequential test for EDUC with the covariates taken in the
order in the data set.
You can find the data in airpollution.csv on CMS.
a. Create a new data set (referred to X below) in which NONWHITE, NOX and SO2 are replaced with
the residuals after regressing each of them on PRECIP and EDUC.
b. Show that when producing a model to predict MORT with either the original covariates or the new
covariates, you get the same predicted values (use the maximum absolute difference in predictions to
show this).
c. Add SO2 to MORT (this increases the coefficient of SO2 in the model by 1) and obtain a sequential
ANOVA table (using the function anova) using the new response. Show that this changes the sum of
squares for EDUC when using the original data.
d. Do the same thing using the new data set X and observe that the sum of squares for EDUC does not
change.
e. What happens if you add EDUC to MORT (ie, make its coefficient larger) instead? Are there differences
between the two data sets? Why?
 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!