Using SAS display manager (DM) for data exploration

The display manager (also known as DM) in base-SAS can be used for data exploration. For this demonstration the dataset sashelp.class will be used. Now sashelp.class is easy to get an overview of because it only has five variables. But if you have a lot of variables then some kind of data exploration/data manipulation might be handy.

Let’s say that you would like to take a look at the varable Age. In the DM you will write keep age.

pic32714

This will result in a displaying of the data only showing the variable age. Now you would like to have all the other variables shown but keep age as the first variable being displayed. This can be done writing the command unide _all_ in the DM.

pic18251

Now all the variable will be shown with age as the first variable.

pic10806

It is also possible to keep multiple variables. In the DM you can eg. write keep ‘height weight’. Remember that when keeping multiple variables you will have to write the variables in ‘ ‘.
pic06025

Now only these variables will be shown.
pic19365

You can again unhide the rest of the variables writing unhide _all_ this will keep the height and weight variables as the first variables being shown.
pic16171

Leave a Reply

Your email address will not be published. Required fields are marked *