Hi, I have a dataset "baseline" with continuous variables a, b, c, d and e. And I also have a binary variable age (young, old). I would like to create a plot that contains boxplots for a, b, c, d and e within each group of age. Originally, my code looks like: proc template; define statgraph boxplot_age; begingraph; layout overlay / xaxisopts=(display=(ticks tickvalues)) yaxisopts=(griddisplay=on) cycleattrs=true; boxplot x=age y=a /discreteoffset=-0.3 boxwidth=0.1 name='a' legendlabel='a'; boxplot x=age y=b / discreteoffset= -0.15 boxwidth=0.1 name='b' legendlabel='b'; boxplot x=age y=c / discreteoffset=0 boxwidth=0.1 name='b' legendlabel='c'; boxplot x=age y=d / discreteoffset= 0.15 boxwidth=0.1 name='d' legendlabel='d'; boxplot x=age y=e / discreteoffset= 0.3 boxwidth=0.1 name='e' legendlabel='e'; discretelegend 'a' 'b' 'c' 'd' 'e'; endlayout; endgraph; end; run; proc sgrender data=baseline name=boxplot_age template=boxplot_age; run; However, what I actually want is to view the value of each variable by age group side by side. For example, I would want a boxplot for varible "a", age=young followed by a boxplot for variable "a", age=old and then followed by a boxplot for variable "b", age=young and so on. Please let me know if this is even possible to do in SAS. Any comment would be appreciated and let me know if my question is not clear. Many thanks! Gordon
... View more