Need help to center the graph (in a forest plot)

Reply
New Contributor
Posts: 3

Need help to center the graph (in a forest plot)

Dear SAS users,

I am SAS newbie (actually have no real experience with coding), but I need some assistance with a SAS script. I need to portray multiple risk ratios and confidence intervals in a forest plot as shown by Sanjay in one of these blog posts: http://blogs.sas.com/content/graphicallyspeaking/2014/02/02/ways-to-include-textual-data-columns-in-...

OR Forest Plot

I prefer the second one. However, as one of the people in the second blog post I have linked has asked, when the upper limit of your confidence interval changes, the forest plot becomes squished. I would want it to be centered around 1, i.e. the line of no effect and preferably depict arrows when the upper CI goes beyond the limits of the X-axis. Sanjay himself suggested using two DRAWTEXT statement with DRAWSPACE of DATAVALUE and the appropriate anchor point and also using the unicode symbol for "<-" and "->" for better results. However, I couldn't figure this part out. Since I am new to SAS, I couldn't figure out where to place this in the code.

Th second question I have is that when more subgroups are added to Sanjay's code, the graph again becomes very dense. How does one get around this issue? I am attaching a couple of figures to show you exactly what I trying to convey.;gplo

Really appreciate your help with this matter.

Occasional Contributor
Posts: 7

Re: Need help to center the graph (in a forest plot)

Great site with tons of graphing samples and code, plus if you email him, he is great about responding.

http://robslink.com/SAS/democd1/aaaindex.htm

New Contributor
Posts: 3

Re: Need help to center the graph (in a forest plot)

Thanks, jimbobob. I will try to contact Robert via email. It would be nice if someone could modify the code on the blogpost I linked to solve the issues I am having.

Super User
Posts: 11,129

Re: Need help to center the graph (in a forest plot)

Some of the issue with the version 2 results could be addressed by changing the Height option for the ods graphics.

And I think you may have a data issue that needs to be addressed that is causing ONE ratio to have such a long tail. Or provide explicit x axis min and max values.

New Contributor
Posts: 3

Re: Need help to center the graph (in a forest plot)

Thanks, ballardw, your suggestions are helpful. Another friend in school suggested the same.

However, I don't think it is necessarily a data issue. It is not uncommon to have a long tail (or large upper CI) when you don't have any events in a particular group. RevMan and other programs automatically add 0.5 since you cannot divide anything by zero. So, for example, the sample size is 100, dividing that 0.5 would give you 200 (of course, it is not this straightforward as effect estimates are weighted as well). Nevertheless, I feel this is the issue with that outlier.

Ask a Question
Discussion stats
  • 4 replies
  • 428 views
  • 6 likes
  • 3 in conversation