BookmarkSubscribeRSS Feed
BDORR
Fluorite | Level 6

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

3 REPLIES 3
BDORR
Fluorite | Level 6

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.

DanH_sas
SAS Super FREQ

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.

GeoffDer
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1136 views
  • 0 likes
  • 3 in conversation