- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The normal quantile plot might be enough?
PROC REG DATA=census plots(only)=qq;
MODEL TextSent = TextReceived;
RUN;