12-22-2017 03:27 PM
Below is my code and my output . The blue marked part was repeated. How can I remove the repeated part. I only want to display one "Coronary Heart Disease" and one "Cerebral Vascular Disease" on the header.
where DeathCause in ("Coronary Heart Disease",'Cerebral Vascular Disease') and AgeAtStart>60;
proc sgpanel data=heart;
panelby deathcause BP_Status / rows=1 columns= 6 novarname;
vbar ageatdeath / group=sex groupdisplay=cluster ;
keylegend / title='' noborder;
12-22-2017 04:13 PM
Remove BP_status from the panelby statement. Or change to rows=2 and columns=3 to get the deathcause in a separate panel.
The order of groupings on the panelby statement would depend on what you want to compare easily. With t
panelby deathcause BP_Status / rows=2 columns= 3 novarname; I would expect that the deathcause would be on a single row and the BP_status would align underneath which would show the BP_status within deathcause.
If I wanted to see if similar BP_status had different deathcause I might go with
panelby BP_Status deathcause/ rows=3 columns= 2 novarname;
The layout should support you main purpose of showing the graph at all.