The SAS Output Delivery System and reporting techniques

ODS output with 300dpi

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 105
Accepted Solution

ODS output with 300dpi

Hi!  I have this logistic regression code w/ Odd Ratio Plot.

 

I need to  output/ print just the Odds Ratio Plot in a jpg, tiff, or psd w/  300 dpi for use in a manuscript.

I am really unclear how to use ODS...  I use ods rtf  a lot for just writing in word...but the resolution is low.  What are my other options?

 

proc logistic data=asthma.edip_vitals simple
plots(only)=oddsratio (cldisplay=line
                        order=ascending
                        type=horizontalstat
                        range=(0.5,1.5));title 'Family Structure Effects on ED/Inpatient Utilization';
class household(ref='MM') structure (ref='Married Male')marital_status1 (ref='Married') sponsex1 (ref='Male')
mult_dependents (ref='No') new_race1 (ref='White')pay_grade1 (ref='Enlisted: E1-E5')branch (ref='Army')
agegroup (ref='0') education (ref='HS or less')sex_d (ref='0')/ param=ref;
model utilization (event='1')=structure agegroup mult_dependents new_race1 pay_grade1 education;
oddsratio structure;
run;

 

 

Help is appreciated!!

 


Accepted Solutions
Solution
‎07-28-2016 11:53 AM
Respected Advisor
Posts: 4,609

Re: ODS output with 300dpi

This is where I would start :

 

ods listing gpath="c:\myGraphs" image_dpi=300 style=Journal;
ods graphics / imagename="FamilyStructureEffectsOnED_InpatientUtilization" width=10cm height=8cm reset=index border=off;
title; /* Journals usually don't need figure titles */
proc logistic data=asthma.edip_vitals simple
plots(only)=oddsratio (cldisplay=line
                        order=ascending
                        type=horizontalstat
                        range=(0.5,1.5));
class household(ref='MM') structure (ref='Married Male')marital_status1 (ref='Married') sponsex1 (ref='Male')
mult_dependents (ref='No') new_race1 (ref='White')pay_grade1 (ref='Enlisted: E1-E5')branch (ref='Army')
agegroup (ref='0') education (ref='HS or less')sex_d (ref='0')/ param=ref;
model utilization (event='1')=structure agegroup mult_dependents new_race1 pay_grade1 education;
oddsratio structure;
run;

With a bit of luck, you will get an acceptable Figure. Most often, I end up having to generate the figure with SGPLOT in a subsequent step. So far I have managed to stay away from the complexity of custom templates, except for heat maps.

PG

View solution in original post


All Replies
Grand Advisor
Posts: 17,464

Re: ODS output with 300dpi

In my experience it's unlikely the SAS plot will be suitable for publication. 

 

You'll need to customize the plot, including the title, legend, axis. You can do this via proc template, or develop your own code. There are a lot of samples out there to help get you started. 

Respected Advisor
Posts: 4,609

Re: ODS output with 300dpi

I beg to differ on that statement. My SAS SG graphs are always accepted for publication. I often have to adjust font sizes, resolution, line thickness, aspect ratio, etc. to meet journal requirements, but, in the end, the graphs are accepted.

PG
Grand Advisor
Posts: 17,464

Re: ODS output with 300dpi


PGStats wrote:

I beg to differ on that statement. My SAS SG graphs are always accepted for publication. I often have to adjust font sizes, resolution, line thickness, aspect ratio, etc. to meet journal requirements, but, in the end, the graphs are accepted.


 

 

I agree - you need to adjust the fonts, line thickness, resolution etc. I usually use proc template to make these modifications on the procedure template so I can run PROC PHREG and get a survival curve I can include in a journal publication. 

Given the code the OP provided, those plots wouldn't be accepted in my experience. 

Solution
‎07-28-2016 11:53 AM
Respected Advisor
Posts: 4,609

Re: ODS output with 300dpi

This is where I would start :

 

ods listing gpath="c:\myGraphs" image_dpi=300 style=Journal;
ods graphics / imagename="FamilyStructureEffectsOnED_InpatientUtilization" width=10cm height=8cm reset=index border=off;
title; /* Journals usually don't need figure titles */
proc logistic data=asthma.edip_vitals simple
plots(only)=oddsratio (cldisplay=line
                        order=ascending
                        type=horizontalstat
                        range=(0.5,1.5));
class household(ref='MM') structure (ref='Married Male')marital_status1 (ref='Married') sponsex1 (ref='Male')
mult_dependents (ref='No') new_race1 (ref='White')pay_grade1 (ref='Enlisted: E1-E5')branch (ref='Army')
agegroup (ref='0') education (ref='HS or less')sex_d (ref='0')/ param=ref;
model utilization (event='1')=structure agegroup mult_dependents new_race1 pay_grade1 education;
oddsratio structure;
run;

With a bit of luck, you will get an acceptable Figure. Most often, I end up having to generate the figure with SGPLOT in a subsequent step. So far I have managed to stay away from the complexity of custom templates, except for heat maps.

PG
Grand Advisor
Posts: 17,464

Re: ODS output with 300dpi

It's really common with survival plots - which is why SAS has a bunch of macros that show users how to customize the template. It's actually easier than I thought to customize. Writing SGTemplate code from scratch - not my cup of tea for sure. 

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 338 views
  • 3 likes
  • 3 in conversation