Code:
options linesize=76;
options pagesize=53;
data gpadat;
infile 'a:\anal2.dat';
input gpa inc;
label inc='Income'
gpa='GPA';
title 'Income/GPA Analysis';
proc plot;
plot inc*gpa='*';
proc reg;
model inc=gpa;
output out=new1 p=predict r=resid;
proc univariate normal plot;
var resid;
proc rank normal=blom out=new2;
var resid;
ranks normscrs;
proc plot;
plot resid*gpa='*' / vref=0;
plot resid*normscrs='*';
label resid='Residuals'
normscrs='Normal Scores';
run;
Output:
Plot of INC*GPA. Symbol used is '*'.
|
|
35000 +
| *
|
| * *
| * *
| * * *
30000 +
| * * *
| * * *
| * * *
| *
| * * * * *
I 25000 + * *
n | * * *
c | *
o | * * *
m | * *
e | * * *
20000 + *
| * *
| *
|
| * * *
| *
15000 + * * *
| *
| *
| *
| *
| *
10000 + *
|
---+----+----+----+----+----+----+----+----+----+----+----+----+--
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0
GPA
Income/GPA Analysis
Model: MODEL1
Dependent Variable: INC Income
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Prob>F
Model 1 2039676985.8 2039676985.8 406.776 0.0001
Error 62 310883236.89 5014245.7564
C Total 63 2350560222.7
Root MSE 2239.25116 R-square 0.8677
Dep Mean 22757.41708 Adj R-sq 0.8656
C.V. 9.83965
Parameter Estimates
Parameter Standard T for H0:
Variable DF Estimate Error Parameter=0 Prob > |T|
INTERCEP 1 271.540275 1149.4898110 0.236 0.8140
GPA 1 7994.978418 396.40525736 20.169 0.0001
Variable
Variable DF Label
INTERCEP 1 Intercept
GPA 1
Univariate Procedure
Variable=RESID Residual
Moments
N 64 Sum Wgts 64
Mean 0 Sum 0
Std Dev 2221.408 Variance 4934655
Skewness -0.0318 Kurtosis -0.43214
USS 3.1088E8 CSS 3.1088E8
CV . Std Mean 277.676
T:Mean=0 0 Pr>|T| 1.0000
Num ^= 0 64 Num > 0 34
M(Sign) 2 Pr>=|M| 0.7080
Sgn Rank 7 Pr>=|S| 0.9631
W:Normal 0.980895 Pr W 0.6960
Quantiles(Def=5)
100% Max 4840.703 99% 4840.703
75% Q3 1637.36 95% 3381.108
50% Med 131.0351 90% 2738.16
25% Q1 -1642.27 10% -2740.63
0% Min -4911.31 5% -3583.21
1% -4911.31
Range 9752.011
Q3-Q1 3279.633
Mode -4911.31
Extremes
Lowest Obs Highest Obs
-4911.31( 42) 3097.725( 29)
-4543.8( 61) 3381.108( 52)
-4075.93( 43) 4159.418( 28)
-3583.21( 40) 4663.046( 22)
-3063.48( 21) 4840.703( 48)
Univariate Procedure
Variable=RESID Residual
Stem Leaf # Boxplot
4 78 2 |
4 2 1 |
3 |
3 14 2 |
2 679 3 |
2 014 3 |
1 677899 6 +-----+
1 113344 6 | |
0 57789 5 | |
0 011234 6 *--+--*
-0 4311 4 | |
-0 95 2 | |
-1 4433100 7 | |
-1 8776 4 +-----+
-2 4433 4 |
-2 8775 4 |
-3 1 1 |
-3 6 1 |
-4 1 1 |
-4 95 2 |
----+----+----+----+
Multiply Stem.Leaf by 10**+3
Univariate Procedure
Variable=RESID Residual
Normal Probability Plot
4750+ *++*
| * ++
| +++
| +**
| ***
| **
| ****
| ***
| **+
| ***+
| **
| +*
| ****
| +***
| +**
| ****
| *+
| ++*
| ++ *
-4750+ *++*
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
Plot of RESID*GPA. Symbol used is '*'.
|
|
6000 +
|
|
| *
| *
|
4000 + *
|
| *
| * *
| * *
| *
2000 + * * *
R | * * *
e | * * * *
s | * * *
i | * * * *
d | * * *
u 0 +--*----*---------------------------------------*---------*-------
a | * *
l | *
s | * * *
| * * * *
| * * *
-2000 + *
| * * * *
| * * * *
| *
|
| *
-4000 + *
|
| *
| *
|
|
-6000 +
|
---+----+----+----+----+----+----+----+----+----+----+----+----+--
1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0
GPA
NOTE: 4 obs hidden.
Plot of RESID*NORMSCRS. Symbol used is '*'.
|
|
6000 +
|
|
| *
| *
|
4000 + *
|
| *
| **
| **
| *
2000 + ***
R | ***
e | ***
s | **
i | **
d | **
u 0 + ***
a | *
l | *
s | ***
| ***
| **
-2000 + *
| ***
| ****
| *
|
| *
-4000 + *
|
| *
| *
|
|
-6000 +
|
-+----------+----------+----------+----------+----------+----------+
-3 -2 -1 0 1 2 3
Normal Scores