Date: Fri, 31 Jan 1997 19:22:01 +0000
Reply-To: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Organization: NETCOM Internet Ltd.
Subject: Re: [Fwd: PROC GPLOT - Overlaying Plots]
Content-Type: text/plain; charset=us-ascii
> Faith wrote:
> Good morning.
> I have combined adverse events and daily dosing file with the following
> structure: (hopefully this is more clear than my proc transpose post)
> PTID (patient id)
> DOSE (daily dose)
> STARTDT (date of daily dose)
> AEITEM (adverse event text)
> ONSETDT (onset date of adverse event for the patient)
> RESOLVDT (resolved date of adverse event for the patient)
> The 'actual' data is laid out as follow with the fields ordered as
> 11002 10.5 06/26/95 Increased BUN 06/14/95 07/10/95
> 11002 10.5 06/26/95 Confusion 06/21/95 06/23/95
> 11002 10.5 06/26/95 LE Weakness 06/21/95 06/23/95
> 11002 10.5 06/26/95 Constipation 06/21/95 07/01/95
> 11002 10.5 06/27/95 Increased BUN 06/14/95 07/10/95
> 11002 10.5 06/27/95 Confusion 06/21/95 06/23/95
> 11002 10.5 06/27/95 LE Weakness 06/21/95 06/23/95
> 11002 10.5 06/27/95 Constipation 06/21/95 07/01/95
> 11002 10.5 06/28/95 Increased BUN 06/14/95 07/10/95
> 11002 10.5 06/28/95 Confusion 06/21/95 06/23/95
> 11002 10.5 06/28/95 LE Weakness 06/21/95 06/23/95
> 11002 10.5 06/28/95 Constipation 06/21/95 07/01/95
> STARTDT of dose is the varying factor here. the adverse events has no
> patterned relation to the ONSETDT of the adverse event in the interest
> of solving this problem. That's why I want the graph-- to see the
> relationship, if you will.
> For every new STARTDT, there exists the exact same adverse events and
> the exact same ONSETDT and RESOLVDT. The daily DOSE is not necessarily
> the same for each daily dose STARTDT.
> What I'm attempted to do without much success is to plot adverse events
> relative to the dosing schedule by patient. Note: I'm not interested in
> the adverse events relative to the DOSE -- only relative to the STARTDT
> date of daily dose.
> I want the daily dose to be on the vertical axis and the date of dose to
> be on the horizontal axis in conjunction with the date of adverse
> I would like a 'line' on the graph showing the daily dose activity
> relative to the date. that's the easy part. The difficult part for me
> was getting a continuous line to display for EACH adverse event relative
> to the daily dose. Since the above patient has 4 adverse events, there
> would be 4 unique lines associated with each adverse event. These lines
> would start at the ONSETDT date point on the x-axis and the related
> daily DOSE on the y-axis. They would be a continuous straight horizontal
> line extending from left to right and ending at the adverse event
> | Increased BUN
> | |-----------------------------------------------------------|
> | Confusion
> | |------------|
> | LE Weakness
> | |------------|
> | Constipation
> | |------------------------------------------|
> 10.5 | ____________________*
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - -
> 14JUN96 21JUN95 23JUN95 26JUN95 27JUN95 28JUN95 01JULY95
> It is not important or necessary that all of the timepoints appear on
> the horizontal axis. The vertical axis, the daily dose, will have NO
> association with the vertical axis as far as the graph is concerned.
> It's has only a date relationship here.
> right in the midst of all of this will be a line plot of the
> relationship between daily dose and dose date. see the line marked by an
> asterisk. In this case, it's a straight line. in other cases it will be
> a 'variable' line.
> hmmm... that's interesting. this patient's adverse events started BEFORE
> drug use.
> Is this doable with SAS/GRAPH or am I asking too much of SAS/GRAPH? If I
> am, are there any products you can recommend which can help me with this
> 'overlayed' type of graph?
> any help would be much appreciated as I am at the end of my rope and the
> fire is hot. :-)
> thank you in advance and g'night!
> Faith Renee Sloan (FRS ASSOCIATES) - WEB Site Design and Interactive
> Programming/SAS and Internet Training - A SAS Institute Quality Partner
> http://www.frsa.com (world-wide-web home base)
> http://www.frsa.com/sas - SAS for the Masses
> http://www.frsa.com/bbpage.shtml BodyBuilding Page
> a Pointgrrl for San Francisco Webgrrls
> email@example.com -- http://www.webgrrls.com/sf
This is doable with SAS. You plot your variable data in the normal way
and you do the AE bars using an annotate dataset. This is not as
difficult as you might think. As mentioned by another poster, you will
have to choose "heights" for your bars in advance. Choose your heights,
sort into your AEs and use the start as an annotate "move" then draw a
little bar and then "draw" to the end and finish with a little bar. You
have to choose the right XSYS and YSYS parameters though.
A lot of people have trouble with annotate datasets so if your brain
glazed over then don't blame yourself. I have a simple macro that turns
a dataset into an annotate and draws it. In this case it will have to be
modified. It should be easy to convert it to do what you want.
I'm sorry but I don't have SAS on my PC. If I did I would have written
it for you. Check out the %MKLNANNO macro on my web site. This should
be a good start. Work out how that works then maybe you will be able to
modify it to do what you want.
If you need further details then feel free to email me.