Data visualization with SAS programming

Box Plot for multiple variables by group.

Reply
Occasional Contributor
Posts: 6

Box Plot for multiple variables by group.

Hello folks, can some one help me with this.

I have data columns in this format.

Group |Var 1 |Var2 |Var3| .....

I need Box plots of all variables side by side in one graph, for each group.
so I could see patterns of all variables by group.
SAS Super FREQ
Posts: 925

Re: Box Plot for multiple variables by group.

What version of SAS do you have?
Occasional Contributor
Posts: 6

Re: Box Plot for multiple variables by group.

I.m using SAS 9.1
SAS Super FREQ
Posts: 925

Re: Box Plot for multiple variables by group.

I do not havea good solution for SAS 9.1; but if you have access to SAS 9.2, you should be able to do this using PROC SGPANEL. Do you have acces to SAS 9.2?
SAS Employee
Posts: 977

Re: Box Plot for multiple variables by group.

Could you describe a little more of what you're wanting?

You might can use traditional proc gplot's box plots, or proc boxplot.

I see your data has a 'Group' variable, but do the plots have to be "grouped"
into these groups, per-say (within the same single plot axis)?
If not, then you could maybe do some tricks such as using the 'Group'
variable as a 'by variable' instead, producing a separate plot for each
group ... and then tiling these plots side-by-side using "ods htmlpanel"
(or greplay), for example.

And if all else fails, you can "draw" custom boxplots with annotate
(if all else fails).

Also, I notice you have several separate "variables" - depending on what
you're wanting to do, you might need to "proc transpose" the data to turn
those variables into values, in order to conveniently create the plot.

Really need to see some example data, and get more details on what
you're wanting to do to give specifics though...
Ask a Question
Discussion stats
  • 4 replies
  • 217 views
  • 0 likes
  • 3 in conversation