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
- /
- SAS Programming
- /
- SAS Procedures
- /
- Graph with bars using HILOT interpolation - URGENT

Topic Options

- 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

06-08-2012 05:24 AM

I need to create a graph like this (see attached) i.e. the mean including 95%CI using proc gplot:

I use in the SYMBOL statement i=hilot to join the lower and the upper limit but SAS always includes the "---" at the middle of the 2 values. Is that possible to do not have it? Or do you have an other method to create such output?

Thanks,

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

Posted in reply to amoreau1

06-08-2012 11:53 AM

It would be helpful to post the code, at least the symbol statemenst and plot procedure code you are trying.

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

Posted in reply to ballardw

06-08-2012 12:02 PM

symbol1 interpol=join ^

c=black

line=1

width=2;

symbol2 interpol=hilot

c=black

cv=black

line=1

ci=black

width=2;

proc gplot data=final_;

plot mean2*Visn low_up2*Visn

/

overlay

haxis=axis1

vaxis=axis2

legend=legend1;

run;

quit;

In Mean2 variable I have the mean per timepoint

In Low_up2, I have lower and upper CI values (it means that for the same visit, I have 2 lines : 1 line is mean + lower CI and 1 line is mean + upper CI.

Thanks.

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

Posted in reply to amoreau1

06-08-2012 03:03 PM

Try this:

drop the first symbol statment and change SYMBOL2 to SYMBOL1 so there is only one symbol statement

then in the PLOT statement drop the overlay and just plot the lower and upper - PLOT LOW_UP2 * VISN;

this should plot the lower and upper bound and the HILOTJ option will calculate the mean of the lower and upper and join it for each timepoint

Another option is to reshape the data so each time point has 3 observations - low, mean, high. Then plot that with one symbol statemement using HILOCTJ.

Read the documentation on HILO to understand all of the options.

Hope all that is clear. For some reason I can't paste SAS code here, otherwise I would paste a snippit for clarity.

Renee

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

Posted in reply to amoreau1

06-09-2012 09:48 AM

hi ... I think that this is more or less what the other folks were suggesting that you try ...

*** compute mean and 95% CI;**

**proc summary data=sashelp.class nway;**

**where age between 12 and 15;**

**class age;**

**var height;**

**output out=stats (drop=_ lclm=low mean=mean uclm=high;**

**run;**

*** rearrange the data;**

**data stats (keep=age x1 x2);**

**set stats;**

**x1=mean; x2=low; output;**

**x1=.; x2=high; output;**

**run;**

**goptions reset=all gunit=pct ftext='calibri' htext=3;**

*** one symbol for the mean (dot), one symbol for the CI;**

**symbol1 f='wingdings' v='6c'x c=blue w=2 h=4;**

**symbol2 i=hilotj c=blue w=2;**

**axis1 minor=none offset=(5,5)pct label=('AGE');**

**axis2 label=(a=90 'HEIGHT');**

**proc gplot data=stats;**

**plot x1*age=1 x2*age=2 / overlay noframe haxis=axis1 vaxis=axis2;**

**run;**

**quit;**