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.
08-07-2014 02:07 PM
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.
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.
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";
For full control you could save the predicted values and CIs from proc reg and use these with proc sgplot.