BookmarkSubscribeRSS Feed
an358
Calcite | Level 5

Hi,

 

I have a problem with SAS code in Proc glm!

I want to test my residual normality but QQplot for all my response ariables are the same with the same mean and standard deviation, my main problem is with Proc univariate!

I will send you my code.

 

I would be thankful if you tell me what should I do with the code!

Regards,

 

proc glm;
class Sex Type ;
model Staplelength=Sex Type /solution;

OUTPUT OUT=diagnost p=Ybar r=resid;

run;

PROC pLOT data=diagnost;

PLOT resid*ybar/vref=0;

run;

PROC UNIVARIATE ;

Histogram resid/ normal;

QQPLOT resid/normal;
run;

1 REPLY 1
Rick_SAS
SAS Super FREQ

If you want QQPlot and histogram of the residuals, you can get those plots directly from PROC GLM. For example, study the following code:

 

ods graphics on;

proc glm data=sashelp.cars plots=DiagnosticsPanel;
class Origin Type ;
model Length=Origin Type /solution;
run;

 

I don't understand your statement "all my response variables are the same with the same mean and standard deviation."  If the Staplelength variable is continuous, then your code should produce the plots that you expect.  If not, I suggest you look at the data. For example, plot a histogram of Staplelength.  

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1284 views
  • 2 likes
  • 2 in conversation