turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Problem with SAS code in Proc glm

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-14-2016 01:51 PM - last edited on 11-14-2016 02:53 PM by AnnaBrown

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

11-14-2016 03:24 PM

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.