BookmarkSubscribeRSS Feed
Miah
Obsidian | Level 7

I am learning about SAS programming. I am trying to create a normal probability plot under the PROC REG statement. Attached it is my data set. This is my model/code: 

 

DATA census;
INFILE "/folders/myfolders/census.txt"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT ClassGrade Ageyears Height_cm Footlength_cm Armspan_cm SchoolSleep NonSchoolSleep TextSent TextReceived;
RUN;

PROC PRINT DATA= census;
RUN;

PROC REG DATA=census;
MODEL TextSent = TextReceived;
RUN;

ODS GRAPHICS ON;

PROC REG DATA=census
PLOTS TextSent*TextReceived npp.*r.;
MODEL TextSent = TextReceived;
title 'Normal Probability Plot On The Residuals';
RUN;

 

But my code is not working. How can I possibly generate my desired plot? Normal Probability Plot on the residuals?

2 REPLIES 2
Reeza
Super User

 

The PLOTS syntax you're using is no longer supported in PROC REG, but you should look at the default plots and see if that meets your need. 

 

proc reg data=sashelp.class plots;
model weight = height age;
run;

If this doesn't meet your needs, you can use an OUTPUT statement to capture the residuals and use PROC UNIVARIATE or SGPLOT to create the plot 'manually'. 

 

PS. Please include a clear description of what "doesn't work" means. That could mean anything from your computer literally being on fire to a simple syntax error message. Include the log at minimum.

PGStats
Opal | Level 21

The normal quantile plot might be enough?

 


PROC REG DATA=census plots(only)=qq; 
MODEL TextSent = TextReceived;
RUN;
PG

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!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 5631 views
  • 2 likes
  • 3 in conversation