Docsity

Testing Hypotheses and Diagnostics in Multiple Regression - Prof. Christopher J. Williams, Exams of Statistics

Toggle sidebar
bg1
1 Testing hypotheses in regression
There are three general types of hypotheses that we may be interested in testing in multiple regression:
1) H0:β1=β2=... =βk= 0, ’None of the xvariables explain variation in y’ (Overall regression F
test), 2) H0:βj= 0, ’xjdoes not explain additional variation in ybeyond what is already explained
by x1, x2, .., xj−1,xj+1,., xk’ (Partial F test = standard t test), or 3) H0:βg+1 =βg+2 =... =βk= 0,
’xg+1, xg+2, ..., xkdo not explain additional variation beyond what is already explained by x1, x2, ..., xg’
(Multiple Partial F test). All three of these kinds of hypotheses may be tested using the extra sum of
squares principle. Using the extra sum of squares principle, we specify a full model, which includes all
terms; and a reduced model, which consists of only those terms that remain if H0is true. These models are
nested, and thus the full model will always have a larger SS(Regression) than the reduced model. The key
question is if the SS(Regression) is increased enough in the full model to justify the use of the extra terms
in the model. The null hypothesis H0can then be tested using the test statistic:
F=(SS(Regression)F−SS(Regression)R)/(#terms in H0)
MS(Residual)F
,
where the subscript Rindicates the reduced model and the subscript Findicates the full model. The
statistic Fcan be compared to the critical value Fdf1,df2,α where df1 = #terms in H0, df 2 = the degrees of
freedom for MS(Residual)F,and αis the prechosen significance level.
For example, with our sandwich data we have y=β0+β1x1+β2x2+ε, where y= calories, x1= fat,
and x2= cholesterol. We can test null hypothesis 1, H0:β1=β2= 0, by defining the full model to be
y=β0+β1x1+β2x2+εand the reduced model to be y=β0+ε. Check the SAS program to see how
to specify the reduced model. Our results are: SS(Regression)F= 6391.86, SS (Regression)R= 0., and
MS(Residual)F= 60.25.Then our F statistic is
F=(6391.86 −0.)/2
60.25 = 53.04,
which can be compared to an F2,4,α value. Note that this is the overall Ftest presented in the SAS
printout, and has a P-value of .0013. It also turns out that the Ftest for hypothesis 2) H0:βj= 0, is
equivalent to the t-test next to the coefficient on the SAS printout. For hypotheses of the form 3) (Multiple
Partial F test), we need to run the full and reduced models separately and use both outputs to conduct the
test.
2 Regression diagnostics: residual analysis
Recall that the residuals εin the multiple regression model y=β0+β1x1+... +βkxk+εshould 1) have a
mean of 0, 2) be independent, 3) have a normal distribution, and 4) have a common variance σ2. We can
estimate the εterms from our sample via one of several types of residuals:
Name of residual Formula
residual bεi=yi−byi
standardized residual zi=bεi/sε
studentized residual ri=bεi/(sε√1−hi)
jackknife residual r(−i)=bεi/(sε(−i)√1−hi)
1
pf2

Partial preview of the text

Download Testing Hypotheses and Diagnostics in Multiple Regression - Prof. Christopher J. Williams and more Exams Statistics in PDF only on Docsity!

1 Testing hypotheses in regression

There are three general types of hypotheses that we may be interested in testing in multiple regression:

  1. H 0 : β 1 = β 2 = ... = βk = 0, ’None of the x variables explain variation in y’ (Overall regression F test), 2) H 0 : βj = 0, ’xj does not explain additional variation in y beyond what is already explained by x 1 , x 2 , .., xj− 1 ,xj+1,., xk’ (Partial F test = standard t test), or 3) H 0 : βg+1 = βg+2 = ... = βk = 0, ’ xg+1, xg+2, ..., xk do not explain additional variation beyond what is already explained by x 1 , x 2 , ..., xg ’ (Multiple Partial F test). All three of these kinds of hypotheses may be tested using the extra sum of squares principle. Using the extra sum of squares principle, we specify a full model, which includes all terms; and a reduced model, which consists of only those terms that remain if H 0 is true. These models are nested, and thus the full model will always have a larger SS(Regression) than the reduced model. The key question is if the SS(Regression) is increased enough in the full model to justify the use of the extra terms in the model. The null hypothesis H 0 can then be tested using the test statistic:

F =

(SS(Regression)F − SS(Regression)R)/(#terms in H 0 ) M S(Residual)F

where the subscript R indicates the reduced model and the subscript F indicates the full model. The statistic F can be compared to the critical value Fdf 1 ,df 2 ,α where df 1 = #terms in H 0 , df 2 = the degrees of freedom for M S(Residual)F , and α is the prechosen significance level. For example, with our sandwich data we have y = β 0 + β 1 x 1 + β 2 x 2 + ε , where y = calories, x 1 = fat, and x 2 = cholesterol. We can test null hypothesis 1, H 0 : β 1 = β 2 = 0, by defining the full model to be y = β 0 + β 1 x 1 + β 2 x 2 + ε and the reduced model to be y = β 0 + ε. Check the SAS program to see how to specify the reduced model. Our results are: SS(Regression)F = 6391. 86 , SS(Regression)R = 0., and M S(Residual)F = 60. 25. Then our F statistic is

F =

which can be compared to an F 2 , 4 ,α value. Note that this is the overall F test presented in the SAS printout, and has a P-value of .0013. It also turns out that the F test for hypothesis 2) H 0 : βj = 0, is equivalent to the t-test next to the coefficient on the SAS printout. For hypotheses of the form 3) (Multiple Partial F test), we need to run the full and reduced models separately and use both outputs to conduct the test.

2 Regression diagnostics: residual analysis

Recall that the residuals ε in the multiple regression model y = β 0 + β 1 x 1 + ... + βkxk + ε should 1) have a mean of 0, 2) be independent, 3) have a normal distribution, and 4) have a common variance σ^2. We can estimate the ε terms from our sample via one of several types of residuals:

Name of residual Formula residual ε̂i = yi − ̂yi standardized residual zi = ̂εi/sε studentized residual ri = ̂εi/(sε

1 − hi) jackknife residual r(−i) = ε̂i/(sε(−i)

1 − hi)

where sε =

M SE, hi is called the leverage of the ith observation and satisfies 0 ≤ hi ≤ 1, and sε(−i) is sε computed without the ith observation. The last three types (standardized, studentized, and jackknife) are fairly similar if the regression assumptions are satisfied. Since the last type, the jackknife residual, is best at detecting various problems, we will often use it. It can be obtained in SAS Proc Reg on the Output statement with the RSTUDENT option, and is contained in the SYSTAT RESIDUAL data file with the variable name STUDENT. A sound strategy for diagnosing the adequacy of a regression model is to try a candidate model, then obtain a variety of plots of residuals. These include histograms, normal plots, and scatter plots of the residuals versus the predicted values, and the individual xi values. Normal plots are explained on page 766 and in Example 13.16. Look at Figures 11.14-11.17 on pages 576-7 of the text to see what various types of residual plots look like for data that satisfy the model assumptions and for data that fail certain assumptions. Plots of residuals versus time can be useful for data that are collected over time, and an improved type of plot of residuals versus xi, called a partial regression plot, adjusts for all other xi′ terms in the model. Partial regression plots can be obtained in SAS Proc Reg by using the / PARTIAL option in the Model statement, and in SYSTAT by saving the PARTIAL/DATA data set and then creating plots. A useful way to evaluate the collection of residual plots is to look at the plots for problems, and focus on characterizing the potential effect of these problems on the final regression model.