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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Question about PROC REG PLOTS with ODS_GRAPHICS

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

08-07-2014 09:38 AM

I am a newcomer to SAS/GRAPH and ODS Graphics and I have what I think is a pretty basic question for the support community.

I am running some regression analyses and I would like to create a simple publication quality graph of my regressions. These are simple polynomial regressions (quartic cubic). I have come close to the final product I would like but it’s not quite there yet.

Some specifics: I am using SAS PROC REG in 9.2 and the PLOTS command with ODS graphics. Language is below.

proc reg data=Harvest plots=predictions (x=Predation_Level);

model Total_Weight_Harvested = Predation_Level Predation_Level2;

title "Total fish Harvest"; run; quit;

The above produces the figure below:

What I would like to do is remove the residuals chart and just print the fit graph in a grey scale publication style format with a DPI of at least 300. I would like to only include the 95% Confidence limits represented as lines not a band and keep the trendline. I would also like the chart be editable (e.g. change fonts type and size, axis titles, legend etc.).

Is this possible and can anyone help me with this? Providing SAS code and examples would be tremendously helpful.

Thanks

Brian

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

Posted in reply to BDORR

08-07-2014 02:07 PM

Geoff,

Thanks, that is getting closer to what I would like but not quite there yet. I still have a few problems.

First I have SAS 9.2 v1 which does not recognize the SGE=ON syntax. I get a syntax error msg. So my graph is not editable. Is there some other syntax for 9.2 v1?

Second the graph still has a band for the 95% CLM rather than say dotted lines and no fill.

Lastly, I would like to change the X and Y axis scales to a default scale. I did not ask about his earlier.

thanks for your help.

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

Posted in reply to BDORR

08-08-2014 11:02 AM

The SGE=ON only works for the LISTING desitnation in SAS 9.2.

ods listing sge=on;

GIve that a try and see if it works for you. As Goeff said, SGPLOT is another good option.

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

Posted in reply to BDORR

08-08-2014 05:33 AM

Try using proc sgplot,eg

ods listing sge=on image_dpi=300;

proc sgplot data=harvest;

reg Y=total_Weight_Harvested x = Predation_Level / degree=2 clm nomarkers clmattrs=(clmfillattrs=(color=lightgray));

xaxis label="Total Weight Harvested";

yaxis label="Level of predation";

run;

For full control you could save the predicted values and CIs from proc reg and use these with proc sgplot.