Type : SASHELP
Les données proviennent de la table SASHELP.HEART. Un filtrage est appliqué pour exclure les causes de décès 'Unknown' et 'Other'.
| 1 | %let gpath='.'; |
| 2 | %let dpi=200; |
| 3 | |
| 4 | ods html close; |
| 5 | ods listing gpath=&gpath image_dpi=&dpi; |
| 6 | |
| 7 | DATA heart; |
| 8 | SET sashelp.heart(where=(deathcause ne 'Unknown' and deathcause ne 'Other')); |
| 9 | RUN; |
| 1 | ods graphics / reset attrpriority=color width=4in height=4in imagename='RowLattice'; |
| 2 | title 'Distribution of Cholesterol by Death Cause'; |
| 3 | PROC SGPANEL DATA=heart noautolegend; |
| 4 | panelby deathcause / layout=rowlattice onepanel novarname spacing=10; |
| 5 | histogram cholesterol; |
| 6 | density cholesterol; |
| 7 | rowaxis offsetmin=0; |
| 8 | colaxis max=420; |
| 9 | RUN; |
| 1 | ods graphics / reset attrpriority=color width=4in height=4in imagename='RowLatticeInset'; |
| 2 | title 'Distribution of Cholesterol by Death Cause'; |
| 3 | PROC SGPANEL DATA=heart noautolegend; |
| 4 | panelby deathcause / layout=rowlattice onepanel noheader spacing=10; |
| 5 | inset deathcause / position=topleft nolabel; |
| 6 | histogram cholesterol; |
| 7 | density cholesterol; |
| 8 | rowaxis offsetmin=0; |
| 9 | colaxis max=420; |
| 10 | RUN; |
| 1 | ods graphics / reset attrpriority=color width=4in height=4in imagename='RowLatticeInset2'; |
| 2 | title 'Distribution of Cholesterol by Death Cause'; |
| 3 | PROC SGPANEL DATA=heart noautolegend; |
| 4 | panelby deathcause / layout=rowlattice onepanel noheader spacing=10; |
| 5 | inset deathcause / position=topleft nolabel backcolor=silver; |
| 6 | histogram cholesterol; |
| 7 | density cholesterol; |
| 8 | rowaxis offsetmin=0; |
| 9 | colaxis max=420; |
| 10 | RUN; |
| 1 | ods graphics / reset attrpriority=color width=4in height=4in imagename='LatticeInset'; |
| 2 | title 'Distribution of Cholesterol by Death Cause'; |
| 3 | PROC SGPANEL DATA=heart noautolegend; |
| 4 | panelby sex deathcause / layout=lattice onepanel noheader spacing=10; |
| 5 | inset deathcause sex / position=topleft nolabel; |
| 6 | histogram cholesterol; |
| 7 | density cholesterol; |
| 8 | rowaxis offsetmin=0 offsetmax=0.15; |
| 9 | colaxis max=420; |
| 10 | RUN; |