EXST7034 Time series Geaghan Chapter 12 Microcomputer example Page 1 1 *************************************************************; 2 *** EXST7034 Homework Example ***; 3 *** Problem from Neter, Wasserman & Kuttner 1989, 13.92 ***; 4 *************************************************************; 5 6 dm'log;clear;output;clear'; 7 options nodate nocenter nonumber ps=512 ls=99 nolabel; 8 ODS HTML style=minimal rs=none 8 ! body='C:\Geaghan\Current\EXST7034\Fall2005\SAS\TimeSeries01.html' ; NOTE: Writing HTML Body file: C:\Geaghan\Current\EXST7034\Fall2005\SAS\TimeSeries01.html 9 10 DATA ONE; INFILE CARDS MISSOVER; 11 TITLE1 'EXST7034 - Homework Example NWK 13.9 : Microcomputer components'; 12 LABEL X = 'Industry production (millions $)'; 13 LABEL Y = 'Value of components used ($1000)'; 14 INPUT Y X; t+1; 15 X1 = LAG1(X); LABEL X1 = 'X lagged 1 interval'; 16 Y1 = LAG1(Y); LABEL Y1 = 'Y lagged 1 interval'; 17 CARDS; NOTE: The data set WORK.ONE has 16 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.02 seconds 17 ! RUN; 34 ; 35 PROC PRINT DATA=ONE; VAR Y X t; TITLE2 'Raw Data Listing'; RUN; NOTE: There were 16 observations read from the data set WORK.ONE. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): real time 0.10 seconds cpu time 0.02 seconds EXST7034 - Homework Example NWK 13.9 : Microcomputer components Raw Data Listing Obs Y X t 1 102.9 2.052 1 2 101.5 2.026 2 3 100.8 2.002 3 4 98.0 1.949 4 5 97.3 1.942 5 6 93.5 1.887 6 7 97.5 1.986 7 8 102.2 2.053 8 9 105.0 2.102 9 10 107.2 2.113 10 11 105.1 2.058 11 12 103.9 2.060 12 13 103.0 2.035 13 14 104.8 2.080 14 15 105.0 2.102 15 16 107.2 2.150 16 36 OPTIONS LS=99 PS=61; 37 38 PROC REG DATA=ONE; TITLE2 'Simple Linear regression'; 39 MODEL Y = X / P R DW; 40 OUTPUT OUT=RESIDS PREDICTED=YHAT RESIDUAL=E; OPTIONS LS=99 PS=35; 41 RUN; 42 NOTE: The data set WORK.RESIDS has 16 observations and 7 variables. NOTE: The PROCEDURE REG printed pages 2-5. NOTE: PROCEDURE REG used (Total process time): real time 0.12 seconds cpu time 0.06 secondsEXST7034 Time series Geaghan Chapter 12 Microcomputer example Page 2 EXST7034 - Homework Example NWK 13.9 : Microcomputer components Simple Linear regression The REG Procedure Model: MODEL1 Dependent Variable: Y Number of Observations Read 16 Number of Observations Used 16 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 1 213.99470 213.99470 234.98 <.0001 Error 14 12.74967 0.91069 Corrected Total 15 226.74437 Root MSE 0.95430 R-Square 0.9438 Dependent Mean 102.18125 Adj R-Sq 0.9398 Coeff Var 0.93393 Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept 1 -7.73852 7.17464 -1.08 0.2990 X 1 53.95332 3.51967 15.33 <.0001 Durbin-Watson D 0.857 Number of Observations 16 1st Order Autocorrelation 0.527 OutputStatistics Dependent Predicted Std Error Std Error Student Cook's Obs Variable Value Mean Predict Residual Residual Residual -2-1 0 1 2 D 1 102.9000 102.9737 0.2441 -0.0737 0.923 -0.0799 | | | 0.000 2 101.5000 101.5709 0.2419 -0.0709 0.923 -0.0768 | | | 0.000 3 100.8000 100.2760 0.2690 0.5240 0.916 0.572 | |* | 0.014 4 98.0000 97.4165 0.3918 0.5835 0.870 0.671 | |* | 0.046 5 97.3000 97.0388 0.4117 0.2612 0.861 0.303 | | | 0.011 6 93.5000 94.0714 0.5804 -0.5714 0.758 -0.754 | *| | 0.167 7 97.5000 99.4128 0.2992 -1.9128 0.906 -2.111 | ****| | 0.243 8 102.2000 103.0276 0.2449 -0.8276 0.922 -0.897 | *| | 0.028 9 105.0000 105.6714 0.3298 -0.6714 0.896 -0.750 | *| | 0.038 10 107.2000 106.2648 0.3576 0.9352 0.885 1.057 | |** | 0.091 11 105.1000 103.2974 0.2494 1.8026 0.921 1.957 | |*** | 0.140 12 103.9000 103.4053 0.2516 0.4947 0.921 0.537 | |* | 0.011 13 103.0000 102.0565 0.2387 0.9435 0.924 1.021 | |** | 0.035 14 104.8000 104.4844 0.2819 0.3156 0.912 0.346 | | | 0.006 15 105.0000 105.6714 0.3298 -0.6714 0.896 -0.750 | *| | 0.038 16 107.2000 108.2611 0.4628 -1.0611 0.835 -1.271 | **| | 0.249 Sum of Residuals 0 Sum of Squared Residuals 12.74967 Predicted Residual SS (PRESS) 16.46858 43 PROC PLOT DATA=RESIDS; PLOT E*t='T' / VREF=0; RUN; NOTE: There were 16 observations read from the data set WORK.RESIDS. NOTE: The PROCEDURE PLOT printed page 6. NOTE: PROCEDURE PLOT used (Total process time): real time 0.07 seconds cpu time 0.00 secondsEXST7034 Time series Geaghan Chapter 12 Microcomputer example Page 3 EXST7034 - Homework Example NWK 13.9 : Microcomputer components Simple Linear regression Plot of E*t. Symbol used is 'T'. E | | 2 + | T | | | 1 + T T
View Full Document