Unformatted text preview:

EXST7034 - Regression Techniques Page 1EXAMPLE: Using SAS to test hypotheses about and ""!"EXST7034 - EXAMPLE 1Program Statements*************************************************************;*** EXST7034 Example 1 using PC-SAS ***;*** Problem from Neter, Wasserman & Kuttner 1989, 2.19 ***;*************************************************************;OPTIONS LS=80 PS=61 NOCENTER NODATE NONUMBER;DATA ONE; INFILE CARDS MISSOVER; TITLE1 'EXST7034 - EXAMPLE 1'; INPUT X Y;CARDS;raw data here;PROC SORT; BY X Y;PROC PRINT; TITLE2 'Raw Data Listing';PROC REG; TITLE2 'Regression Models done with SAS REGprocedure'; MODEL Y = X / XPX I P CLM; TEST X = 5; RUN;Model: MODEL1Model Crossproducts X X X Y Y YwwwX X INTERCEP X YwINTERCEP 10 10 142X 10 20 182Y 142 182 2194X X Inverse, Parameter Estimates, and SSEw INTERCEP X YINTERCEP 0.2 -0.1 10.2X -0.1 0.1 4Y 10.2 4 17.6EXST7034 - EXAMPLE 1Regression Models done with SAS REG procedureDependent Variable: YAnalysis of Variance Sum of MeanSource DF Squares Square F Value Prob>FModel 1 160.00000 160.00000 72.727 0.0001Error 8 17.60000 2.20000C Total 9 177.60000 Root MSE 1.48324 R-square 0.9009 Dep Mean 14.20000 Adj R-sq 0.8885 C.V. 10.44535EXST7034 - Regression Techniques Page 2Parameter Estimates Parameter Standard T for H0:Variable DF Estimate Error Parameter=0 Prob > |T|INTERCEP 1 10.200000 0.66332496 15.377 0.0001X 1 4.000000 0.46904158 8.528 0.0001 Note: 8.528 72.726782œOutput from the PROC REG “TEST" option for “TEST X = 5;"Dependent Variable: YNumerator: 10.0000 DF: 1 F value: 4.5455Denominator: 2.2 DF: 8 Prob>F: 0.0656Notes:1) t test of parameter estimate (= 8.528) is equal to the square root of the F test ofthe model. F 72.727 ; F = 72.727 = 8.529. These are the sameœÈÈtest.2) The value for the standard error of b is" Var(b ) = = = = 0.22 = s",n MSE 2.2^nX - (X -X)_2025DD22(X) 10222n10’“333"D s 0.22 0.46904158,"œœÈ Which is also equal to the square root of MSE*c from the (X X) matrix, where33w"-MSE = 2.2 and c 0.1.""œ3) The value for the standard error of b is! Var(b ) = = = 0.44!D5 DDDXXMSEnX - n(X-X)_20*2.210*1022 22(X)22n33333’“Dœ s 0.44 0.66332496,0œœÈ 4) The TEST option was used to test the hypothesis that H : =5. The!""alternative would be the two tailed alternative that H : 5.""" ÁThe option produced the results: F = 4.5455, P(>F) = 0.0656Which should be the square of t, or t = F 2.132.Èœ t = 2.132(b )s s 0.46904158 0.46904158 b54.0 5 1""!""""bbœœœœEXST7034 - Regression Techniques Page 3EXST7034 - EXAMPLE 1 : Vial breakage regressed on number of airlinetransfers.Example of confidence limits for the regression line at various values of X . A3missing value was included with an X value of 4.Regression Models done with SAS REG procedure Dep Var Predict Std Err Lower95% Upper95% Obs Y Value Predict Mean Mean Residual 1 8.0000 10.2000 0.663 8.6704 11.7296 -2.2000 2 9.0000 10.2000 0.663 8.6704 11.7296 -1.2000 3 11.0000 10.2000 0.663 8.6704 11.7296 0.8000 4 12.0000 10.2000 0.663 8.6704 11.7296 1.8000 5 13.0000 14.2000 0.469 13.1184 15.2816 -1.2000 6 15.0000 14.2000 0.469 13.1184 15.2816 0.8000 7 16.0000 14.2000 0.469 13.1184 15.2816 1.8000 8 17.0000 18.2000 0.663 16.6704 19.7296 -1.2000 9 19.0000 18.2000 0.663 16.6704 19.7296 0.8000 10 22.0000 22.2000 1.049 19.7814 24.6186 -0.2000 11 . 26.2000 1.483 22.7796 29.6204 .Sum of Residuals -1.59872E-14Sum of Squared Residuals 17.6000Predicted Resid SS (Press) 25.8529 Example of confidence limits for a new point at various values of X . A missing3value was included with an X value of 4.Regression Models done with SAS REG procedure Dep Var Predict Std Err Lower95% Upper95% Obs Y Value Predict Predict Predict Residual 1 8.0000 10.2000 0.663 6.4532 13.9468 -2.2000 2 9.0000 10.2000 0.663 6.4532 13.9468 -1.2000 3 11.0000 10.2000 0.663 6.4532 13.9468 0.8000 4 12.0000 10.2000 0.663 6.4532 13.9468 1.8000 5 13.0000 14.2000 0.469 10.6127 17.7873 -1.2000 6 15.0000 14.2000 0.469 10.6127 17.7873 0.8000 7 16.0000 14.2000 0.469 10.6127 17.7873 1.8000 8 17.0000 18.2000 0.663 14.4532 21.9468 -1.2000 9 19.0000 18.2000 0.663 14.4532 21.9468 0.8000 10 22.0000 22.2000 1.049 18.0109 26.3891 -0.2000 11 . 26.2000 1.483 21.3628 31.0372 .Sum of Residuals -1.59872E-14Sum of Squared Residuals 17.6000Predicted Resid SS (Press) 25.8529EXST7034 - Regression Techniques Page 4Summary of the results due to the assumptions made (a) S = MSE then E(S ) = 2225 (b) Distributions (1) b is distributed N[ , (X X) ]3w""52- We do not assume Cov( , ) = 0 as with the Y's. More later.""3 j (2) is distributed FMSRegMSE(df MSReg, df MSE) For multiple regression this is a joint test, so the distribution has a noncentralityparameter which is zero when , , ... equals zero. (When H is"" ""# kotrue) (3) In particular is distributed tb - Sc(df Error)33"È2ii where the c is the Gaussian multiplier from (X X)ii-w" (c) What if the distribution of Y is not normal?3 1) If the departure is small, the distribution is still reasonably symmetric,then the regression coefficients will be approximately normal and theeffect on confidence intervals and tests of hypothesis will be


View Full Document
Download Regression Techniques
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Regression Techniques and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Regression Techniques 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?