BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Fara_I
Fluorite | Level 6

I have the following set of data, and I am trying to do a regression analysis to show a table of predicted values and residuals for the dataset and then plot the residuals versus x on a scatter plot. I have the following code so far and will greatly appreciate any help! 

DATA A;
INPUT x y;
cards;
10 8.04
8 6.95
13 7.58
9 8.81
11 8.83
14 9.96
6 7.24
4 4.26
12 10.84
7 4.82
5 5.68
;

proc reg data = A ; ods graphics on; 
MODEL y = x;
PLOT RESIDUAL. * x;
run; quit;

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

I believe this gives you all you describe 🙂

 

data a;
input x y;
cards;
10 8.04
8 6.95
13 7.58
9 8.81
11 8.83
14 9.96
6 7.24
4 4.26
12 10.84
7 4.82
5 5.68
;

ods graphics on; 
proc reg data = a; 
model y = x / r cli clm;
run;quit;

View solution in original post

1 REPLY 1
PeterClemmensen
Tourmaline | Level 20

I believe this gives you all you describe 🙂

 

data a;
input x y;
cards;
10 8.04
8 6.95
13 7.58
9 8.81
11 8.83
14 9.96
6 7.24
4 4.26
12 10.84
7 4.82
5 5.68
;

ods graphics on; 
proc reg data = a; 
model y = x / r cli clm;
run;quit;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 445 views
  • 0 likes
  • 2 in conversation