BSM004 Computer lab Download data file (Regression_lab_data.xls) in computer lab session from moodle Open Regression_lab_data.xls Go to data -> data analysis Select regression Select B2-B61 for Y Select C2 – C61, D2 – D61, E2 – E61 for Xs Tick residuals in Residual options Click ok Basic discussion on the regression result Autocorrelation Graphic approach: (plot residual and first order residual) In regression result output spreadsheet, create (residual -1) in D28-D86 which is the first-order residual value Select C28 – D86 Go to insert -> scatter No clear relationship here In SPSS Create Residual lag 1 variable with Compute variable option in Transform Go to Graphs -> Legacy dialogs -> Scatter/Dot -> Simple Scatter Set Y as Residual, X as Residual lag 1 Click ok No clear relationship here Formal test: (regression) In excel o Select regression (constant is zero) o Select C28-C86 for Y o Select D28-D86 for Xs o Select constant is zero and click ok o From the regression result we can see the model failed the F test, R2 is very small and the coefficient (p) is not significant o Therefore no clear autocorrelation here In SPSS (DW test) o Download data file (Regression_lab.sav) from Moodle o Open SPSS, open the data file o Go to analyse o Under regression, select linear o Input Y and Xs o Click on statistics option on right top part of regression table o Tick Durbin-Watson option in Residual o Click continue, then click ok o Now we have a separate window in result for DW test. The DW value is 1.891, which is quite close to 2. p = 0.0545 => positive relationship, o dl and du at (1%, 60, 3) = 1.32, 1.52 o Compare DW with dl and du o DW = 1.891 > du , we accept the H0, autocorrelation is not significant. In SPSS (Regression on first order autocorrelation) o Create Residual lag 1 o Run regression (Y: Residual, X: Residual lag 1) o In Option, unlick “include constant in equation” o From the regression result we can see the model failed the F test, R2 is very small and the coefficient (p) is not significant o Therefore no clear autocorrelation here Heterscedasticity Graphic approach (Plot residual) Create Square value of residual in E27-E86 Select B27-B86, E27-E86 Go to insert -> scatter -> scatter with only marks The plot reflects variance of the residual is not constant In SPSS Create Residual squared variable with Compute variable option in Transform Go to Graphs -> Legacy dialogs -> Scatter/Dot -> Simple Scatter Set Y as Residual squared variable, X as predicted Y Click ok The variance is not constant Formal test SPSS steps are the similar to details in excel file Save the residual and predicted y Use compute variables to create residual squared value, predicted y squared value and all possible combination of independent variables Run regressions for LM and White test Check F test, or use n*Ru2 Remember to use the correct m for χ2 test