Programming the statistical procedures from SAS

Problem with SAS code in Proc glm

Reply
Frequent Learner
Posts: 1

Problem with SAS code in Proc glm

[ Edited ]

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;

SAS Super FREQ
Posts: 3,555

Re: Problem with SAS code in Proc glm

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.  

 

Ask a Question
Discussion stats
  • 1 reply
  • 110 views
  • 2 likes
  • 2 in conversation