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 r=resid;
proc univariate normal plot;
var resid;
proc plot;
plot resid*gpa='*' / vref=0;
label resid='Residuals';
run;
Output:
Income/GPA Analysis 1
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
NOTE: 10 obs hidden.
Income/GPA Analysis 2
The REG Procedure
Model: MODEL1
Dependent Variable: inc Income
Analysis of Variance
Sum of Mean
Source DF Squares Square F Value Pr > F
Model 1 2039676619 2039676619 406.78 <.0001
Error 62 310883308 5014247
Corrected Total 63 2350559927
Root MSE 2239.25142 R-Square 0.8677
Dependent Mean 22757 Adj R-Sq 0.8656
Coeff Var 9.83966
Parameter Estimates
Parameter Standard
Variable Label DF Estimate Error t Value Pr > |t|
Intercept Intercept 1 271.54225 1149.48994 0.24 0.8140
gpa GPA 1 7994.97770 396.40530 20.17 <.0001
Income/GPA Analysis 3
The UNIVARIATE Procedure
Variable: resid (Residual)
Moments
N 64 Sum Weights 64
Mean 0 Sum Observations 0
Std Deviation 2221.40849 Variance 4934655.68
Skewness -0.0317967 Kurtosis -0.4321404
Uncorrected SS 310883308 Corrected SS 310883308
Coeff Variation . Std Error Mean 277.676061
Basic Statistical Measures
Location Variability
Mean 0.0000 Std Deviation 2221
Median 131.0352 Variance 4934656
Mode . Range 9752
Interquartile Range 3280
Tests for Location: Mu0=0
Test -Statistic- -----p Value------
Student's t t 0 Pr > |t| 1.0000
Sign M 2 Pr >= |M| 0.7080
Signed Rank S 7 Pr >= |S| 0.9631
Tests for Normality
Test --Statistic--- -----p Value------
Shapiro-Wilk W 0.990457 Pr < W 0.9045
Kolmogorov-Smirnov D 0.050152 Pr > D >0.1500
Cramer-von Mises W-Sq 0.031578 Pr > W-Sq >0.2500
Anderson-Darling A-Sq 0.184406 Pr > A-Sq >0.2500
Quantiles (Definition 5)
Quantile Estimate
100% Max 4840.704
99% 4840.704
95% 3381.108
90% 2738.162
Income/GPA Analysis 4
The UNIVARIATE Procedure
Variable: resid (Residual)
Quantiles (Definition 5)
Quantile Estimate
75% Q3 1637.360
50% Median 131.035
25% Q1 -1642.272
10% -2740.636
5% -3583.215
1% -4911.311
0% Min -4911.311
Extreme Observations
------Lowest----- -----Highest-----
Value Obs Value Obs
-4911.31 42 3097.73 29
-4543.80 61 3381.11 52
-4075.93 43 4159.42 28
-3583.22 40 4663.04 22
-3063.48 21 4840.70 48
Income/GPA Analysis 5
The 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
Income/GPA Analysis 6
12:35 Tuesday, November 7, 2000
The UNIVARIATE Procedure
Variable: resid (Residual)
Normal Probability Plot
4750+ *++*
| * ++
| +++
| +**
| ***
| **
| ****
| ***
| **+
| ***+
| **
| +*
| ****
| +***
| +**
| ****
| *+
| ++*
| ++ *
-4750+ *++*
+----+----+----+----+----+----+----+----+----+----+
-2 -1 0 +1 +2
Income/GPA Analysis 7
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.