1. The data watershd-Version-0.txt is a set of simulated data on peak rate of flow Q (in cubic feet per second (cfs)) of water from six watersheds following storm episodes. The storm episodes have been chosen from a larger data set to give a range of storm intensities. The independent variables are
Variable Definition
This dataset watershd-Version-0.txt is available in LMS unit STAT2401 on- line. Please download the data, save it in “your working directory”, and read in the data by
setwd("your working directory")
watershd = read.table(file="watershd-Version-0.txt",header=T)
(a) Take Q as the dependent variable and X1-X9 as independent variables.
(b) Describe the process of backwards variable selection, implemented using F- test and p-value approach, for a multiple linear regression model.
[5 marks]
(c) Fit a linear model using log(Q) as the dependent variable and using the logarithms of all nine of the original independent variables as the new inde- pendent variables. Write down your fitted model equation, R code used to fit this model, and F-statistic with associated p-value from the information below the summary table of coecients of this fitted model. [4 marks]
(d) Based on the model fitted in part (c), is log(Q) related to at least some of the explanatory variables? Explain your reasoning. [3 marks]
(e) Starting with the NULL model, i.e. log(Q) = 0 + ✏, perform forward vari- able selection using F-tests to select a model. The variables we consider are the logarithms of all nine independent variables. Work at a 5% significance level. Write down your fitted model equation for the model finally selected. [5 marks]
(f) Starting with the FULL model, i.e. regress log(Q) on the logarithms of all nine independent variables (this is the model in part (c)), perform backward variable selection using F-tests to select a model. Work at a 5% significance level. Write down your fitted model equation for the model finally selected. [5 marks]
(g) State the common explanatory variables of the final models found in parts (e) and (f). [3 marks]