A simple dorecasting model. First compute partial regression coefficients using non-log data. Test for significance. Check backcast                            
  Then select best model and convert data to logs. Partial regression coefficients will be then elasticities.                            
                               
  1 2 3 4 5 6 7 8 9 10          
                               
  Period Sales Temperature Spread (Y-Ybar)^2 (X-Xbar)^2 (Z-Zbar)^2                
    Y X Z       (Y-Ybar)(X-Xbar) (Y-Ybar)(Z-Zbar) (X-Xbar)(Z-Zbar)          
1 95-96 430 30 12 2,500 9 4 150 100 6          
2 96-97 335 21 10 2,025 36 0 270 0 0          
3 97-98 520 35 22 19,600 64 144 1120 1680 96          
4 98-99 490 42 6 12,100 225 16 1650 -440 -60          
5 99-00 470 37 8 8,100 100 4 900 -180 -20          
6 00-01 210 20 2 28,900 49 64 1190 1360 56          
7 01-02 195 8 9 34,225 361 1 3515 185 19          
8 02-03 270 17 8 12,100 100 4 1100 220 20          
9 03-04 400 35 6 400 64 16 160 -80 -32          
# 04-05 480 25 17 10,000 4 49 -200 700 -14          
  Sum 3800 270 100 129,950 1,012 302 9,855 3,545 71          
  Sum/n 380 27 10 12995 101.2 30.2 985.5 354.5 7.1          
  Meaning Ybar Xbar Zbar q^2y q^2x q^2z qxy qzy qxz          
                               
Var. Class.                              
DEPENDENT Ybar Mean Y Avg.                        
Independent Xbar MeanX Avg.                        
Independent Zbar MeanZ Avg.                        
                               
                               
Variance is the average squared difference between the values in a series and the mean q^2y=12,995.0; q^2x=101.2;a^2a30.2                              
Covariance - measures the tendency of two variables to move or vary together.1xy=985.5;qzy=354.5;qxz=7.1                              
                               
Partial Regression Coefficients                              
b= (qzyqxz-qxyq^2x)/((qxz)^2-q^2xq^2z                            
c= qxy*qxz-qzy*q^2x/(qxz)^2-q^2q^2z                            
a Ybar-bXbar-cZbar                            
                               
b= (345,5*7.1 - 985.5*30.2)/(7.1^2-101.2*30.2                            
c= (985.5 * 7.1 -345.5 * 101.2 (7.1)^2 - 101.2*30.3                            
a= 380 - 9.0641.27 - 9.6074 * 10                            
                               
Solve from matrix   Quot. Numerator Denominator                      
b =   9.064102095 -27245.15 -3005.83                      
c =   9.607446196 -28878.35 -3005.83                      
a =   39.19478147                          
                               
Note q = phi                              
                               
                               
Tests                              
  Visual Test                            
  Year Actual Backcast                        
  95-96 430 426                        
  96-97 335 326                        
  97-98 520 568                        
  98-99 490 478                        
  99-00 470 451                        
  00-01 210 240                        
  01-02 195 198                        
  02-03 270 270                        
  03-04 400 414                        
  04-05 480 429                        
                               
(see diagram)                              
                               
                               
  1 2 3 4 5 6 7 8 9            
              et et^2 (et-et-1)^2            
  Period Sales Temperature Spread (Y-Ybar)^2 Yhat (estimated) Y - Yhat (Y-Yhat)^2              
    Y X Z                      
1 95-96 430 30 12 2500 426 4 16              
2 96-97 335 21 10 2025 326 9 81 25            
3 97-98 520 35 22 19600 568 -48 2,304 3,249            
4 98-99 490 42 6 12100 478 12 144 3,600            
5 99-00 470 37 8 8100 451 19 361 49            
6 00-01 210 20 2 28900 240 -30 900 2,401            
7 01-02 195 8 9 34225 198 -3 9 729            
8 02-03 270 17 8 12100 270 0 0 9            
9 03-04 400 35 6 400 414 -14 196 196            
# 04-05 480 25 17 10000 429 51 2,601 4,225            
  Sum 3800 270 100 129950     6,612 14,483            
  Sum/n 380 27 10 12995                    
                               
Some Simple Tests                              
Standard Error= SQRT (sum (Y-Yhat)^2)/n                            
Calc. SQRT 6,612/10                            
  26                            
Standard error is the most widely used statistical measure of forecasting accuracy.                              
It forms the basis basis for confidence and interval estimates and other goodness of fit measures.                              
                               
Coefficient of Determination                              
The multiple coefficient of determination (R2) measures the percent of variance around the mean that                              
is explained by the regression equation.                              
                               
R2 =1 - SE^2/q^2y                              
                               
R2 0.949118892                            
                               
  Durbin Watson                            
Auto Correlation - Do forecasted relationships hold. Impact of seasonality and and nmon linearity problems.                              
Durbin Watson Sum (et-et-1)^2/(e2t)                            
  14,483/6,612                            
  2.190411373                            
                               
Eliminating autocorreelation by converting numbers to change.                              
                               
The rule of thumb for the DW statistic between 1.5 AND 2.5 indicates no serious auto correlation                              
                               
                               
                               
Confidence Interval Estimation                              
                               
Confidence Range Y hat +/-tpSESQRT (n/(n-k)                              
N = number of observations                              
k is the number of variables including the dependent variable                              
tp is the value from the from the table t statistic for n - k degrees of freedom                              
Example:                              
For the sales in the example cited we want a a confidence range such that there is a probability of actual                              
sales falling within range. Therefore using 7 degrees of freedom this value is 1.895. Thus the confidence                              
interval is Yhat +/- 1.895*26*SQRT10 - 3                              
Yhat +/- 59                              
                               
                               
                               
                               
Convert to Logs so that partial regression coefficients will be elasticities                              
                               
  Period Sales Temperature Spread                      
    Y X Z                      
1 95-96 2.633468456 1.477121255 1.079181246                      
2 96-97 2.525044807 1.322219295 1                      
3 97-98 2.716003344 1.544068044 1.342422681                      
4 98-99 2.69019608 1.62324929 0.77815125                      
5 99-00 2.672097858 1.568201724 0.903089987                      
6 00-01 2.322219295 1.301029996 0.301029996                      
7 01-02 2.290034611 0.903089987 0.954242509                      
8 02-03 2.431363764 1.230448921 0.903089987                      
9 03-04 2.602059991 1.544068044 0.77815125                      
# 04-05 2.681241237 1.397940009 1.230448921                      
                               
                               
SUMMARY OUTPUT                              
                               
Regression Statistics                              
Multiple R 0.985935705                            
R Square 0.972069215                            
Adjusted R Square 0.964088991                            
Standard Error 0.029814624                            
Observations 10                            
                               
ANOVA                              
  df SS MS F Significance F                    
Regression 2 0.21655627 0.108278135 121.8097625 3.64E-06                    
Residual 7 0.006222383 0.000888912                        
Total 9 0.222778653                          
                               
  Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%              
Intercept 1.484164282 0.069826563 21.25500971 1.28E-07 1.319050815 1.649277749 1.319050815 1.649277749              
X Variable 1 0.596449831 0.046474658 12.83387227 4.05E-06 0.486554805 0.706344857 0.486554805 0.706344857              
X Variable 2 0.261560184 0.035068632 7.458522634 0.000142191 0.178636106 0.344484261 0.178636106 0.344484261              
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               
                               

Last Updated on 6/5/2005
By Brian Browne