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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1301 views
  • 2 likes
  • 2 in conversation