Project Part 4

profileMyhome2020@
RunningMultipleRegressionV2.pptx

Running Multiple Regression To Obtain a Company Revenue Forecast

Outline and Supporting Slides

The following slides support an outline of the regression procedure.

This outline is the key for you reference to regression concepts.

Each point in the outline is supported by one or more slides with reference to the outline on each of the slides. Look for the outline reference point in the upper right corner of the slides following the outline. You will find that the material should enable you to address most issues with multiple regression.

The Bold Text slides are specific Minitab instructions to use along with outline content.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Outline for the Evaluation of Regression

Before Running Regression:

A. Evaluate the relationship of the dependent (Y) variable and (X) variables

by plotting time series of each. X variables should meet the basic criteria.

B. Evaluate the significance of independent variables before you run regression models by:

1. Correlation Scatter Plots of X versus Y (look for linearity)

2. Correlation Coefficients (look for magnitude 0 to 1 and sign + or -)

3. Correlation Significance (t-test and P test for Ho: r=0, reject then variable is

significant)

Determine data transformation requirement using scatter plots. Explore transformation scatter plots to determine the correct X transform. Use the transformed X variables instead of raw X data.

Y autcorrelations for events and seasonality -- Run autocorrelation on the Y variable. Look for characteristics especially seasonality or other major qualitative factors.

1. Use dummy X variables for other qualitative events (e.g. 9-11, hurricane Kartina)

If seasonality is detected you must:

2. Use dummy variables for each monthly or quarterly period (except one) as additional X variables. The forecast will then include seasonality. You must omit one of the seasonal period to avoid multicollinearity discussed later.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

3

Evaluation of Regression (continued)

Run Regression:

E. Evaluate the X variables by:

1. Evaluating the Logic of the Coefficient Sign –Does it make sense?

2. t-Test and F-test to Evaluate X variable coefficient (b) significance with Ho: b=0

by comparing the t-value to t-table or p to reject when X variable is significant.

F. Serial Correlation test for error term serial correlation by:

1. Plot forecast fitted data Ŷ against Y values and look for + or – type

2. Check DW between 0 and 4 to compare with table lower limit and 4 - lower limit

G. Heteroscedasticity test in mintab by plotting the residuals vs the independent variable or time series and look for megaphone disitribution of the residuals use KB Test to determine if you have it.

Multicollinearity check variable sign logic, check X1 vs Xn correlation to ensure

that it is greater than X1 vs Y correlation Look at the Variance Inflation Factors (VIFs) for values that exceed 2.5 – this may indicate multicollinearity.

I. Adjusted R2 and F value check (adjusted R2 for multiple regression) and perform the

F-test Ho: R2=0 test of significance by comparing F value to F-table value to reject

Ho when R2 is significant --useful with multiple regression methods

Residuals time series plot for zero mean and randomness, histogram, and autocorrelation to determine if systematic characteristics exist.

Error measures from the residuals - RMSE and MAPE for the Fit and Forecast.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

A. Independent Variable Candidate Required Characteristics

Plausible relationship between the dependent variable (Y) and the independent variable (X).

Is not subject to large measurement errors

Does not duplicate other independent variables

Not difficult or costly to measure

B. Examine the relationship between variable Y with another variable X

The relationship has to be (1) statistical and (2) logical before you can use X to forecast Y.

These are examples of XY scatter plots and forms of linearity

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

To derive the correlation coefficient you may use the formula below or just go to Basic Statistics/Correlations in Minitab to have it calculate it for you.

The Pearson product moment correlation coefficient takes on the

symbol ρ for the population. Perfect correlations are represented by positive (+1) or negative (-1) values while 0 values represent no correlation.

Just getting a high r value is only half of the job. You must check the p value for significance. That is you must answer the question “Is the (r) that you observe a member of a distribution (of r’s) that have zero mean or expected value?” You must test the null hypothesis Ho: r=0. A p-value of .05 or less is an indication that you may reject the null hypothesis above and the correlation as estimated is good.

r = ∑ (X-X) (Y-Ῡ)

√[∑(X-X)2] [∑(Y-Ῡ)2]

Correlation Coefficients Quantify The

Relationship Between Variables

B.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

B. Using Hypothesis Testing In Bivariate Analysis

(Testing for correlation significance)

Ho: r = 0

H1: r ≠ 0

To determine if your independent (X) variable is useful in regression analysis you must perform a hypothesis test to ensure statistical significance even though you have a high correlation coefficient (ρ).

Use the standard t-test to perform the significance test on the sample Pearson Product Moment correlation value ( r ) with the t-calc equation:

t = r – 0

√(1-r2) /(n-2)

Note that the t value is very sensitive to the size of ( r ) and the number of observations ( n ).

If t-calc is greater than the t-table value for (n-2) observations then you reject the null hypothesis and your (X) variable correlation is statistically significant.

ρ for population, r for the sample

B.

Make sure that you compare the t-calc value for the correlation to the t-table value. t-calc must exceed the t-table value in absolute terms to reject Ho: r=0.

See the table on page 519 in your text.

The critical hypothesis two tailed 95% confidence test is shown by this value for a large sample (39+ observations)

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

C. There are two ways to address a curvilinear XY relationship

(as shown by scatter plots of Y versus X)

Change the form of the regression (e.g. from Linear to Quadratic) but this will change the assumptions made relative to the measures.

[ Use the Minitab/Stat/Regression/Fitted Line Plot/(select quadratic form) and save all descriptive information about the regression. It will take the form of Y= b0+b1X+b2X2. Make sure to substitute the X values in both places to forecast Y.]

Change (transform) the X variable to create a more linear relationship. With a known transformation all of the Regression Statistics still hold just as they did with raw X data but they will be improved.

Again, use only the X transform if required for now in you regression analysis and for your project data.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Minitab Instructions for Running a Regression Model

The variables should be represented by columns in the Minitab Worksheet.

Make sure that you have data series of Y and the X variables of equal length.

Place the forecast of each X variable (including any dummy variables in separate columns.

Go to Stat/Regression/Regression/Fit Regression Model

In the Regression menu select the Y variable as the “Response” and select each of the continuous X variables as “Continuous predictors”. Then select any dummy variables as “Categorical predictors”.

Under “Results” make sure the Durbin-Watson box is checked.

Under the Regression Menu select “Storage” and check the “Residuals” and “Fits” boxes.

Return to the Regression Menu and select “OK”.

Observe the model results on the desktop and see the residuals and fits in the Minitab worksheet.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Minitab Instructions for the Regression Forecast

Make sure that you have first run a good regression model.

Then go to Stat/Regression/Regression/Predict.

In the Predict Menu where it says Enter individual values from the pull down menu at the top select Enter Columns Values.

Select and enter the worksheet columns of forecast values for each of the model continuous X and dummy variables shown by the headings.

Select Storage and store the Predicted fits. The other data is optional.

Go back to the Predict menu and select “OK” and the forecast will appear in your worksheet as “PFITS”.

Plot the forecast appended to the original Y data series to check it for reasonableness.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

C. Poor Linear Relationships and Data Transformation

If you XY scatter plot is not linear you may need to transform your data

Use the Calculator function in minitab to convert your X variable to another form to obtain a linear relationship.

Scatterplot the to select the most linear transformed X and Y relationship.

Run the regression on the transformed X and Y. Check the R square, F, error measures and residuals.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

C. Transformation Applications

This weak linear relationship in data set A will not be helped by transformation.

This curvilinear relationship in data set B could be helped with transformation.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

C. Transformation Types

Make XY relationship more linear if they are curved by For a curved scatter plot a Log

transformation may be best.

Square X2

Square Root √ X Y

Reciprocal 1/X

Log (use natural log) Ln X

1.In minitab Calc select Calculator X

2. Type in an open column to place the results in X

3. Select the Function you wish form the above options

4. In the (number) place the column of you X variable.

Select OK

5. Scatter Plot the Y data and transformed X column

6. Rerun the Correlation Matrix with transformations included

6. If Linear run a Regression on the Y and the best transformed X

7. Evaluate the results, Rsquare, F, B1 error measures and residuals.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

C. Transformation Examples

The following scatter plot slides show what the transformations do to a perfectly linear XY data relationship. If you have a good linear relationship you do not need to transform X.

Note that we only need to transform the X variable – Y stays in its raw form.

The transformations have the reverse effects on the XY data series that are shown on the slides. The scatter plot for transformed data should become more linear. You need to select the best (most linear form) transformation of X.

The best will be indicated by a higher R square value, lower P value for F and a more linear scatter plot.

Be sure to run the best transformed value of X as the independent variable replacing the raw X values in regression analysis.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

D. 1. How to Account For Know Occurrences or other Qualitative Values

What could you do to explain the occurrence of 9-11 or the effect of increased taxes, a sales promotion activity or an XY outlier?

It would be great to have a qualitative variable to account for their effects in a regression.

In this case we can capture the time series influence with a switching or dummy variable with data made by you.

The period(s) that the know influence occurs you switch from 0 to 1. All other periods remain as 0.

You run the multiple regression with this new data series made by you and evaluate the statistics for the new series just as you would for other X variables.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

D. 1. Dummy Independent Variables (X)

(How to Account for Known Qualitative External Factors)

1. Dummy or indicator variables are used to introduce qualitative independent factors to forecast a dependent variable.

2. The are typically used in conjunction with other quantitative X variables. You can use more than one dummy variable.

3. The qualitative factors are indicated with a data series of 0 (no influence) and 1 (influence) assigned for each observation.

4. The dummy variable data series is considered a switch on or off for the qualitative factor.

5. Note that you must be able to account for the dummy variable historically and project it into the forecast future.

6. Also note that you should not introduce symmetry in the dummy variables. That is do not introduce another data series with just the opposite values or a mirror image. Check the significance and regression statistics for inclusion in regression.

7. Symmetry will cause multicollinearity and result in miscalculation of the variable coefficient values and a useless regression forecast.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Seasonality Can be Considered a Qualitative Factor

That Repeats Year After Year

As a result, you may apply dummy variables to account for it.

Keep in mind that you must leave out one seasonal period (month, quarter or week) to prevent symmetry and mulitcollinearity in the regression model.

Even with other qualitative factors or events you do not want symmetry and the resulting multicollinearity. So be careful in developing dummy variables.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

D.2.

Look For Seasonality In the Y data

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

D.3. You can introduce Dummy Variables to Account For Seasonality

In this case you would need to introduce a separate dummy data series of 0 and 1 for each month – but you must leave one month out to avoid symmetry. Symmetry results in multicollinearity.

Y = b0+b1X1+b2X2+b3X3+b4X4+b5X5+……..b11X11

Note that you use the monthly X variables in addition to other X variables.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

D.3.

Example

Note that the seasonal dummy variable matrix has a diagonal of 1 values and a zero filled row for the one period (month) omitted. You must have a total number of seasonal dummy variables that is number of annual periods minus one.

You can see that January was left out of the variable list to prevent multicollinearity in the dummy variables.

Creating monthly seasonal dummy variables with January left out to prevent symmetry (multicollinearity).

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Seasonal Dummy Variable Matrix for Quarterly Data

Dates Y data Q2 Q3 Q4 3 dummy variables

Q1 ----- 0 0 0 for seasonality

Q2 ----- 1 0 0

Q3 ----- 0 1 0

Q4 ----- 0 0 1

Q1 ----- 0 0 0

Q2 ----- 1 0 0

Q3 ----- 0 1 0

Q4 ----- 0 0 1

Q1 ----- 0 0 0

This repeats until you have the same number of seasonal dummy matrix values (rows) as you have Y revenue data minus the hold out.

For the forecast of the dummy variables continue the matrix for the hold out period. That is create the hold out seasonal dummy variables just as you have created this matrix aligned with the appropriate quarters.

When you run the multiple regression remember to examine the dummy variables for significance – if they do not have p-values < .05 then delete the dummy variable from the equation and rerun the multiple regression.

(Do not include variables that are not significiant)

D.4

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

E.1 Independent Variable Evaluation Questions

1. Does the sign of each X variable slope term make sense?

2. Does the t-test indicate that each X variable slope term is statistically significant either positive or negative?

3. How much of the dependent variable is explained by the independent variable(s) shown by Adjusted R2?

4. Evaluating X variable coefficients is determining how Y changes with a one unit change in X. Be careful about the magnitude of the X variables used to estimate the coefficient. Forecasts must be derived using X in the same units as the original regression.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

E.2 Evaluating Regression Coefficient Results

Logic of dependent to independent variable(s) relationship (+ or -). Does it make sense?

- if not it implies and underspecified model and you may need to add independent variables

Size of the Slope term – the closer to zero, the weaker the relationship between independent and dependent variables. A zero coefficient implies no relationship between X and Y and the model is overspecified (includes a non productive variable).

Hypothesis test of the slope coefficient: Ho: β = 0, H1: β ≠ 0

The t-calc value is the slope coefficient (b1)/standard error of b1

The t-table value df is (n-2) and the test is two tailed.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

E.3 How to Determine the t-Calc Values

Operating Expense = 18.9 + 1.30 Player Cost

Predictor Coef SE Coef T P

Constant 18.883 4.138 4.56 0.000

PlayerCt 1.3016 0.1528 8.52 0.000

S = 5.38197 R-Sq = 75.1% R-Sq(adj) = 74.1%

You can determine t-calc by dividing the coefficient value by its respective standard error. (e.g. 8.52=1.3016/.1528)

If you know the t value and standard error of the coefficient you can calculate the coefficient. (1.3016= 8.52 x .1528)

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

E. 4 Determining the Significance of the Coefficients

Due to the size of the variables being forecasted and the change in the variables over the series, the absolute size that the slope term is sometimes hard to determine.

Perform a hypothesis test on the slope term with either a 95% confidence interval where:

Ho: b1 = 0, H1: b1 ≠ 0 when the slope sign is not known and requires a two tailed t-test

Ho: b1< or = 0, H1: b1 > 0 when the slope is positive, one tailed test

Ho: b1> or = 0, H1: b1 < 0 when the slope is negative, one tailed test

or

Use P-values that indicate the level of significance for the slope coefficient. Recall 95% confidence equates to 5% level of significance.

For a two tailed test Ho: b1=0, then P must be less than .05 to reject Ho.

For a one tailed test Ho: b1> or <0 then on half P must be less than .05 to reject Ho.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

E.5 Hypothesis Test of Independent Variables (Xn) Coefficients

Check the statistical significance of each independent variable (X) and the direction of the variable coefficient sign (+ or -) by performing a t-test.

The null hypothesis must be stated: Ho: b ≥ or ≤ 0

Set the null hypothesis the opposite of the sign of your coefficient.

H1: b < or > 0

t-calc for Xi= coefficient (b) of Xi/standard error of Xi

Where:

i is the independent X variable

Compare the t-calc value (provided in the minitab analysis for each X variable) to the t-table value where df = n-(K+1) for a one tailed t-test at 95% significance or ɑ of .05. Remember to compare the absolute t-calc value to the t-table.

n = number of observations

K = number of independent variables

You may use the p values in comparison to calculated t-values.

Comment on the statistical significance of your variables and its sign (+ or -)

E. 6 Testing the Significance of Regression The “ F” Test

This is the equivalent of a two tailed test of the null hypothesis β1 = 0.

It should provide the same results as the t-test for the null hypothesis for a simple regression model with one X variable.

It can be used to evaluate the entire model when the number of X variables increase.

Compare the calculated F value from regression with the F table value on pages 529-530.

Degrees of freedom for the numerator is the (K) number of X variables (e.g. 1 for simple regression)

Degrees of freedom for the denominator is n- (K+1) for the denominator. Where K is the number of X variables. (e.g. n-2 for simple regression)

F calc must exceed F table to reject the null hypothesis

E.7 F-Test Requirement shown in Regression ANOVA

F = Explained variation/K From SSR and SSE

Unexplained variation/[n-(K-1)]

Where

K = the number of independent variables (X)

n = the number of dependent variable (Y) observations

1. Compare the calculated F-statistic with the table B-5 on pages 529-530.

a) Look up the column by using the K value

b) Look up the row by using the [n - (K+1)] value

2. Check to ensure that F-calc (statistic) is greater than F-table to reject Ho

3. The table provides a significance test at 95% confidence or alpha of .05

(See the Table B-2 in your text page 521.)

4. Comment on the F-Test to indicate the reliability of your model.

Test the regression model hypothesis:

Ho: β1=β2=β3=……βn=0 or R2 = 0

Table B-2

Pg. 521

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

F.1 Serial Correlation

(Autocorrelation of Residuals also shown by ACFs and LBQs)

When using time series data detecting Serial Correlation is essential for correct forecasting technique and deserves special attention.

1) Serial correlation implies the error terms are correlated. εt = r εt-1+ v

where ε = residual, r = autocorrelation coefficient, v= random error.

2) Serial correlation, while not introducing bias into the estimated slope coefficient, creates bias in the estimated standard errors.

3) Serial Correlation produces estimated standard error of the regression that is smaller than the true standard error.

4) This produces spurious regression results in that the significance of coefficient estimates and reliability of fit measures (t, p, and F) will be overstated.

5) Regression coefficients may be deemed significant when in fact they are not. R2 will be overestimated.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

F.2. Detecting Serial Correlation With Scatter Plots

( Serial Correlation Weakens your Regression Evaluation Measures)

Negative Serial Correlation

DW is greater than 4-the Lower Limit

Positive Serial Correlation

DW is less than the Lower Limit

Use the Fitted Line Plot in Minitab Regression to detect Serial Correlation. In business Positive Serial Correlation is sometimes detected when business cycles are not picked up by the forecasting estimator.

Autocorrelation in the residuals.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Detecting Serial correlation with the Durbin-Watson Test for Serial Correlation

F.3

Focus on the dl (Lower Limit) in the text DW table. You have

- Positive serial correlation if the DW is below the DW table Lower Limit

- Negative serial correlation if the DW is above 4 minus the DW table Lower Limit.

Sweet Spot

DW table Lo Lim = 1.52

n = 70 k = 3

.975

1.52

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

F.4

K = Number in Independent Variables

N = Number of Data Observations

Use dl for the lower DW value and du for the upper DW value.

Compare these to the DW-calc in Minitab.

DW Table

See Table B-4

Page 525. a= .05

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

F.5 Example

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Note About Serial Correlation

Note that most business models will have some positive serial correlation since business cycle is typical with the data. Again, serial correlation does move the model from confidence to uncertainty but does not prevent the determination of accurate variable coefficients. Therefore, you may use the model to forecast but you cannot be 95% confident in the result.

You may confirm the serial correlation by running a correlation (r) between the regression error terms and the error terms lagged one period. If the correlation coefficient is large then you must try to correct for it.

F.5

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

F.6

Reducing Serial Correlation

Include the square of your independent (X) variable as another independent variable.

Include a lagged value of your dependent (Y) variable as another independent variable (the auto regressive model).

Use the first difference of the X and Y variables to smooth out business cycle influences. Note you must remove the constant term from the transformed regression equation if you do this.

Respecify the model --In the case of positive serial correlation the most likely cause is business cycles. Include a cyclical variable in your model.

Stop Here: The options below are not to be used in this class

Use Cochran-Orcutt to adjust the autocorrelation out of the error terms by introducing ρ (rho) to create a differencing transformation. A new regression that estimates another ρ value that is used to estimate another regression equation with lower serial correlation.

Use the Hildreth-Lu that is similar to Cochran-Orcutt. Both are only good for near term forecasts.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

G. 1 Heteroscedasticity

(Violation of the Residual Constant Variance Assumption)

Uncertainty ------- Low Risk (95% confidence) --- Uncertainty

1) Is present when the error-variance is not constant across the range of the independent variable.

2) The result is bias in error variance estimates and coefficient std. error, causing misleading and overstated statistical inference (R2, t , p and F values).

3) It can be identified with a residual plot against the independent Y variable. Y on the horizontal axis and the error terms or residuals on the vertical axis. Look for the megaphone effect.

Use the 4-in-1 Plots in Minitab and examine the Residuals Versus Order for any megaphone effect over the data series.

4) Fixes for heteroscedasticity include data transformations to stabilize the error variance such as a logarithmic transformation or squared transformation of at least one of the independent (X) variables.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

G.2 Plot the Residuals vs X values and look for a Megaphone

Effect

You want Homoscedasticity in residuals (constant variance)

You do not want Heteroscedasticity in residuals (non constant variance).

Implies that there are systematic influences not picked up in the model and that error will increase over time (in the forecast)

The Forecast Error will larger than the Fit Error.

See the Residuals Versus Order plot in the Minitab 4-in-1 graphs.

?

Fit RMSE and MAPE

0

0

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Heteroscedasticity and Business Data

Like serial correlation heteroscedasticity is often found in business regression model results. This is due to the fact that business have a natural tendency to grow over time (which may result in increased data variance over time). If the selected X variables to not have the same or similar increase in variance the Y variance increase will be found in the regression error terms (heteroscedasticity),

Similar to serial correlation heteroscedasticity does not result in inaccurate variable coefficients. It does move the model from confidence to uncertainty, however. As a result, the forecaster cannot be 95% confident in the model result. Support for models with heteroscedasticity and serial correlation must then become a judgment call based on forecast reasonableness.

G.2

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

G.3

Example

There is slight Heteroscedasticity in this example. In most cases it is more pronounced than this. You may use White’s statistic to confirm heteroscedasticity.

Heteroscedasticity can be a Graphical Judgment Call

?

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

G.4

Example

First run the regression and save the residuals.

Square the residuals. They will become an dependent Y variable in Whites.

Run a regression with the squared residuals substituted for Y (dependent variable) and using the same X variables including any dummy variables, the square of the X variables and their cross products (XX).

Obtain the R2 (note – not the R2 adjusted value).

Multiply the number of observations in the regression by the R2 (remember to move the R2 decimal two places to the left).

Compare this value to the Chi Square table value for 95% confidence with degrees of freedom equal to the number of X variables (including dummy variables).

If the calculated (R2 x n) is equal to or less than the Chi-square value then the residuals are homoscedastic (ok) – if it is greater than the Chi-square value then you have heteroscedasticity. Try to correct for it.

White’s Test for Heteroscedasticity

Heteroscedasticity can be determined quantitatively

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Y = a + b1X1 + b2X2 + b3X3 + e (residuals)

e square = a + X1 + X2 + X3 + X12 + X22+ X32 + X1X2 + X2X3 + X3X1

R square (not the adjusted R square)

R square = 75.6 move decimal over two places left .756

Then multiply the number of observations in regression above (say 50) by the R square (50 x .756 = 38)

Then compare this number (38 above) to the Chi-square table for X.05 in the text page 601.

The degrees of freedom on the left column is the number of X variables in the equation for the new R square value. (9 here)

Table value is 16.919 for 9 degrees of freedom with a Chi-square of .05 significance. (95% confidence)

If the calculated Rsquare x n is greater than the Chi-square value then you have heteroscedasticity – if it is equal to it or less then you do not. In the example above we do have heteroscedasticity.

G.4

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

KB Test for Heteroscedasticity

(Faster and Easier Test)

- Run the regression model and save the Fits and Residuals.

- Square each of them

- Run a simple regression with squared residuals on the left (Y variable position) and squared fits on the right (X variable position.

- Check the t and p values of the Fit variable coefficient

Reject the null then Heteroscedastic – bad model

Accept the null (low t and high p values then the model is Homoscedastic – good model

Note the residuals versus order plot in the 4-in-1 residual graphs low right side – if there is a megaphone effect then it is likely Heteroscedastistic (not good). Also note the pattern in the residuals vs fitted values in the upper right side of the 4-in-1 plots. If you see a pattern then you likely have Heteroscedasticity

G. 5

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Uncertainty ------- Low Risk (95% confidence) --- Uncertainty

H.1 Multicollinearity Check Example

Multicollinearity is independent (X) variable information overlap and indicated by a strong linear relationship between X variables.

Example:

Assume GDP and Personal Disposable Income (PDI) are used to forecast Houses Sold. For example GDP and Personal Disposable Income may have strong significant relationships (correlations) and with Houses Sold. But GDP and PDI may have stronger correlations with each other. (see the Correlation Matrix).

Using both GDP and PDI to forecast Houses Sold would result in

misleading error measures and

overstated t-tests, F and R2 values and understated p-values.

inflated and sensitive X coefficients.

This is a major reason why you do not want a “kitchen sink model”. Overlap or multicollinearity reduces the reliability of forecast measures.

You must comment on model multicollinearity and any steps taken to reduce it.

H.2 Detecting Multicollinearity

Determine correlation coefficients between all independent variables (X) from

the correlation Matrix. This is done prior to running the regression.

2. X to X variable Correlation coefficients of + or - .8 to 1.0 will signal possible

multicollinearity.

3. Determine if the independent correlation coefficients are greater than the

correlation coefficients with the dependent variable.

After running the regression examine independent variable coefficients and look for low t-calc values of each independent variable.

Look at the Variance Inflation Factors (VIFs) for values that exceed 2.5 – this may indicate severe multicollinearity. No multicollinearity is noted by a VIF =1.

VIFs greater than 2.5 indicate potentially unstable and inflated coefficients as well as other significance and regression strength measure overstatements. Adding or deleting any observations will likely create great swings in the coefficients.

Take corrective actions suggested on the next slide and recheck VIFs and coefficient t-values.

H.3 Detection of Mulitcollinearity Example

When Houses Sold (Y) correlation is compared to the X variables DPICI, GDP and Interest Rates IR you need to examine the correlation between X variables.

Examine the correlation matrix before you run the regression. The correlation with houses sold and each X variables ranges from .65 to .79. The following are the X variable correlation coefficients from the correlation matrix.

Note that the correlation between GDP and Disposable Personal Income is greater than its correlation to Houses Sold – a warning sign of Multicollinearity.

Variable Houses Sold DPIC GDI

DPIC .65 1.0

GDI .69 .99 1.0

IR -.79 -.65 -.67

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

H.4 Detection of Mulitcollinearity Example

When signs of the coefficients and t-values don’t make sense – The regression coefficients for houses sold.

Note that the regression coefficient for Disposable Personal Income DPIPC is negative. You would expect DPIPC to have a positive relationship with Houses Sold. Also note the low t-calc value of -.21.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Multicollinearity and Multiple Regression

Note that multicollinearity results from variable selection and is not inherent in the Y data characteristics. It not only caused a loss of model reliability and forecaster confidence but also caused the model coefficients to be miscalculated. In order to forecast with a multiple regression model it must not have multicollinearity. Once detected eliminate it by any means.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

H.5 Reducing Multicollinearity

If the VIF is high eliminate one of the two highly correlated independent variables. Eliminate the variable with the highest VIF first. Check for significant t-calc values and the VIFs.

Transform highest VIF independent variable (X) and rerun the regression with the transformed X. This changes the form of the high VIF variable and may likely reduce the correlation and VIF with other X variables. Recalculate the independent variable correlation coefficients including the first differenced variable to determine if correlation remains high.

If independent variable coefficients VIFs are still high and show

possible multicollinearity use the first difference of one of the highly

correlated independent variables as a substitute for it.

4. Select another independent variable that has a logical coefficient sign, lower correlation and higher t-calc value. (We don’t have time for this)

I.1 Coefficient of Determination R2 (Critical Evaluation of Explanatory Strength of the Regression)

R2 shows the portion of the variation of Y explained by the known variation of the independent variable X

In multiple regression adding independent variables will increase R2 since the correlation with Y will increase.

To adjust for the added variables R2 is recalculated to account for the change in degrees of freedom (K). With 2 independent variable K=2, three independent variables K=3, etc..

The result is Adjusted R2 that explains the true amount of variation explained by multiple regression independent variables.

Comment on the size of the coefficient of determination in discussions of the explanatory power of your regression model.

I.2 Coefficient of Determination R2 and ANOVA

R2 = Sum of Squares Regression (SSR)

Sum of Squares Total (SST)

= Total variability explained by the linear relation

Total variability of Y

= ∑ (Ŷ – Y)2 Where Y is the mean of the actual data values

∑ (Y – Y)2 Where Ŷ is the fitted estimate of each data value

R2 is an easy measure to manipulate and that it generally overstates the fit of a given regression model, especially when serial correlation is present.

Perform hypothesis test on R2 where: Ho: R2= 0, H1: R2≠ 0

R2 = correlation coefficient (r) squared.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

I.3 Testing the Significance of Regression The “ F” Test

This is the equivalent of a two tailed test of the null hypothesis β1 = 0.

It should provide the same results as the t-test for the null hypothesis for a simple regression model with one X variable.

It can be used to evaluate the entire model when the number of X variables increase.

Compare the calculated F value from regression with the F table value on pages 529-530.

Degrees of freedom for the numerator is the (K) number of X variables (e.g. 1 for simple regression)

Degrees of freedom for the denominator is n- (K+1) for the denominator. Where K is the number of X variables. (e.g. n-2 for simple regression)

F calc must exceed F table to reject the null hypothesis

I.4 F-Test Requirement (Found in Regression ANOVA)

F = Explained variation/K From SSR and SSE

Unexplained variation/[n-(K-1)]

Where:

K = the number of independent variables (X)

n = the number of dependent variable (Y) observations

1. Compare the calculated F-statistic with the table B-5 on pages 529-530.

a) Look up the column by using the K value (with 3 X variables K = 3)

b) Look up the row by using the [n - (K+1)] value (with 44 data observations

and 3 variables the row number (n) is 40.)

2. Check to ensure that F-calc (statistic) is greater than 3 times the F-table to reject H0 (e.g. the F table value above is 2.84 times 3 or 8.52)

3. The table provides a significance test at 95% confidence or alpha of .05

4. Comment on the F-Test to indicate the reliability of your model.

Given the regression model hypothesis:

Ho: β1=β2=β3=……βn=0 or R2 = 0

Table B-2

Pg 521

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

J.1 Critical Regression Parameter Assumptions

Assumption 1. The relationship between Y and X is linear, as described in the above equation. This implies that Y is determined by X, rather than vice versa.

Assumption 2. Var(X) is nonzero, and finite for any sample. The values of Xt are not all the same. If Var(X) = 0, it would be impossible to estimate the impact of ∆X on Y.

Assumption 3. The error term (et) has zero expected value. That is random error terms will cancel out (+ and -) over the long run. ∑(et) = 0

Assumption 4. The error term (et) has constant variance for all observations and Var(et) = s2, where:

Assumption 5. The random variables et are uncorrelated, i.e., Cov(et, et-i) = 0 for all i.

Assumption 6. The error term et is normally distributed over the entire range of values.

57

X1

J.2 Best Linear Unbiased Estimators

It is assumed that the residuals are normally distributed about a zero mean. They are Normally Distributed with Constant Variance Over the Entire Range of X (or time series) and the residuals are not statistically significant. ACF LBQ values are low. (e.g. below 21 at lag 12 and below 36.4 at lag 24.)

Note that a residual time series plot is important to verify the mean and the constant variance.

Residuals

0

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

J.3 Implications of the Critical Assumptions

1) The model has at least three unknown parameters:

βo, β1 and s2. (intercept, slope and variance)

2) Each is an normal variate with mean βo + β1X and variance s2.

3) If we know βo, β1 and s2 we can forecast Y using standard normal distribution.

4) Sample estimates of βo, β1 can be obtained using Ordinary Least Squares (OLS) and result in the Best Linear Unbiased Estimates (BLUE)

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

What You Can Do With The X Variables?

How many ways can the data be expressed?

Use the X variable raw data (pointed out in the hypothesis statement)

Create an Index with another X variable

Square the X variable

Square root of the X variable

Reciprocal of the X variable

Natural Log of the X variable

Lead the X variable by a specific number of periods (quarters)

Lag the X variable by a specific number of periods

Model events and qualitative factors with dummy variables

Seasonality

New Product Introduction Y uplifts

Mergers and Acquisitions

Promotional Campaigns

Undefined Y uplift or downshift -- Be careful because you should have a rationale for this variable for the forecast presentation.

See data transformation types in section C.

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

J. Regression Evaluation Questions

1. Does the sign of each X variable slope term make sense?

2. Does the t-test indicate that each X variable slope term is statistically significant either positive or negative?

3. How much of the dependent variable is explained by the independent variable(s) shown by Adjusted R2?

Is the F-calc value more than 3 times the significant F-table value?

Are there 10 data observations per each X variable?

Is the DW value close to 2?

Are the residuals random?

J.4 Regression Evaluation Check List

1. Does the sign of each X variable slope term make sense?

2. Does the t-test indicate that each X variable slope term is statistically significant either positive or negative? Does the P value support this?

3. How much of the dependent variable is explained by the independent variable(s) shown by Adjusted R2? Is the model underspecified?

Is the F-calc significant? Does the P value support this?

Is the F-calc value more than 3 times the significant F-table value?

Are the VIF factors equal to or less than 2.5 (no multicollinearity)

Does the Residuals Versus Order or time series plot indicate a megaphone (heteroscedasticity)

Is the DW value in the sweet spot (higher than the lower limit)?

Are the residuals random? Do they significant variation (ACFs)?

Do the revenue values fall within the forecast 95% limits? TSP

Is the model adequately accurate? See the RMSE and MAPE Fit error measures

Does the TSP of the actual Y appended with the forecast look reasonable? Comment on it. What is the Fit Period error (RMSE, MAPE)?

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

Process for Regression Forecasting

1. Look for causal relationships between the dependent variable to be forecasted and causal independent variables. Clearly state the forecasting problem and your hypothesis of causation.

2. Visually inspect the data looking for trend, seasonality and cycles for all variables (dependent and independent).

3. Determine the best regression model to fit the data (trend or causal, linear or nonlinear, simple regression or multiple regression).

4. Forecast the independent variable by substituting X values into the regression equation to get Y. You can use Minitab Calculator.

5. Specify the regression model by estimating the coefficients bo and b1, b2… Designate a hold out period

that is not used in the estimation of the coefficients.

6. Perform and “in sample” evaluation using error measures and error autocorrelations and hypothesis tests

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

7. Perform a hold out or “out of sample” evaluation using the same error measures and error tests.

8. Adjust or respecify the model as necessary by transforming, adding or deleting independent (explanatory) variables.

9. Repeat “in sample” and “out of sample” error measures and tests to ensure accuracy of the model.

10. Use the tested and selected model to forecast beyond the boundary of known variables or actual observations

11. Check the resulting forecast for reasonableness by plotting the actual observations along with the forecast results.

Process for Regression Forecasting (Continued)

Click to edit Master text styles

Second level

Third level

Fourth level

Fifth level

.

1

2

2

å

=

=

N

t

t

N

e

s