EXST7034 – Regression Techniques Fall 2004 Geaghan Multiple Regression SAS examples Page 1 05b-MultRegIntroHandout.doc 1 ************************************************************************; 2 *** EXST7034 Multiple Regression Example ***; 3 *** Problem from Neter, Kutner, Nachtsheim & Wasserman 1996, #6.18 ***; 4 ************************************************************************; 5 6 OPTIONS LS=99 PS=80 NOCENTER NODATE NONUMBER; 7 8 DATA ONE; INFILE CARDS MISSOVER; 9 TITLE1 'EXST7034 - NKNW 6.18 : Mathematician salaries'; 10 * LABEL X1 = 'Index of publication quality'; 11 * LABEL X2 = 'Number of years experience'; 12 * LABEL X3 = 'Grant support success'; 13 * LABEL Y = 'Thousands of dollars'; 14 INPUT Y X1 X2 X3; 15 CARDS; NOTE: The data set WORK.ONE has 24 observations and 4 variables. NOTE: DATA statement used: real time 0.14 seconds cpu time 0.00 seconds 15 ! RUN; 40 ; 41 PROC REG DATA=ONE; TITLE2 'Multiple Regression Example'; 42 MODEL Y = X1 X2 X3 / partial all; RUN; NOTE: 24 observations read. NOTE: 24 observations used in computations. NOTE: The PROCEDURE REG printed pages 1-9. NOTE: PROCEDURE REG used: real time 0.26 seconds cpu time 0.13 seconds Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 3 627.81700 209.27233 68.12 <.0001 Error 20 61.44300 3.07215 Corrected Total 23 689.26000 Root MSE 1.75276 R-Square 0.9109 Dependent Mean 39.50000 Adj R-Sq 0.8975 Coeff Var 4.43735 Parameter Estimates Parameter Standard Standardized Variable DF Estimate Error t Value Pr > |t| Type I SS Type II SS Estimate Intercept 1 17.84693 2.00188 8.92 <.0001 37446 244.17168 0 X1 1 1.10313 0.32957 3.35 0.0032 306.73233 34.41851 0.26023 X2 1 0.32152 0.03711 8.66 <.0001 263.79445 230.62548 0.65915 X3 1 1.28894 0.29848 4.32 0.0003 57.29022 57.29022 0.30694 Parameter Estimates Squared Squared Squared Squared Semi-partial Partial Semi-partial Partial Variance Variable DF Corr Type I Corr Type I Corr Type II Corr Type II Tolerance Inflation Intercept 1 . . . . . 0 X1 1 0.44502 0.44502 0.04994 0.35904 0.73736 1.35619 X2 1 0.38272 0.68961 0.33460 0.78963 0.77010 1.29852 X3 1 0.08312 0.48251 0.08312 0.48251 0.88225 1.13347 Parameter Estimates Variable DF 95% Confidence Limits Intercept 1 13.67109 22.02277 X1 1 0.41565 1.79061 X2 1 0.24411 0.39893 X3 1 0.66632 1.91156EXST7034 – Regression Techniques Fall 2004 Geaghan Multiple Regression SAS examples Page 2 05b-MultRegIntroHandout.doc EXST7034 - NKNW 6.18 : Mathematician salaries Multiple Regression Example The REG Procedure Model: MODEL1 Dependent Variable: Y Output Statistics Dep Var Predicted Std Error Obs Y Value Mean Predict 95% CL Mean 95% CL Predict Residual 1 33.2000 32.4641 0.7514 30.8968 34.0314 28.4861 36.4421 0.7359 2 40.3000 38.3731 0.4256 37.4854 39.2609 34.6107 42.1356 1.9269 3 38.7000 38.7984 0.6365 37.4707 40.1261 34.9086 42.6882 -0.0984 4 46.8000 43.4911 0.4653 42.5205 44.4618 39.7083 47.2740 3.3089 5 41.4000 42.1142 0.8107 40.4232 43.8053 38.0859 46.1426 -0.7142 6 37.5000 36.2502 0.6701 34.8524 37.6481 32.3359 40.1645 1.2498 7 39.0000 41.1199 0.5936 39.8817 42.3580 37.2597 44.9800 -2.1199 8 40.7000 38.7155 0.7418 37.1681 40.2629 34.7453 42.6857 1.9845 9 30.1000 30.3501 0.8601 28.5559 32.1443 26.2774 34.4228 -0.2501 10 52.9000 51.5991 0.9408 49.6366 53.5616 47.4495 55.7487 1.3009 11 38.2000 37.2937 0.5055 36.2392 38.3482 33.4885 41.0989 0.9063 12 31.8000 35.0382 0.6269 33.7304 36.3460 31.1552 38.9212 -3.2382 13 43.3000 43.8629 0.9923 41.7930 45.9327 39.6615 48.0643 -0.5629 14 44.1000 45.2931 0.5475 44.1509 46.4352 41.4626 49.1235 -1.1931 15 42.8000 44.1116 0.7549 42.5368 45.6863 40.1307 48.0925 -1.3116 16 33.6000 34.3518 0.6815 32.9302 35.7734 30.4289 38.2746 -0.7518 17 34.2000 34.0262 0.9062 32.1359 35.9164 29.9103 38.1420 0.1738 18 48.0000 47.4522 0.6708 46.0530 48.8515 43.5374 51.3670 0.5478 19 38.0000 41.2463 0.7798 39.6197 42.8729 37.2446 45.2480 -3.2463 20 35.9000 34.7173 0.7960 33.0568 36.3778 30.7017 38.7328 1.1827 21 40.4000 41.2814 0.6008 40.0280 42.5347 37.4163 45.1464 -0.8814 22 36.8000 38.2479 0.6460 36.9005 39.5954 34.3514 42.1445 -1.4479 23 45.2000 44.3852 0.8309 42.6520 46.1184 40.3390 48.4313 0.8148 24 35.1000 33.4166 0.5819 32.2029 34.6304 29.5643 37.2690 1.6834
View Full Document