How to manage your data
I love any feature that allows me to improve my efficiency, or assists me in learning the programming / software as easily as possible. Tasks in SAS University Edition allow for both, for a large variety of functions.
The first group of tasks are categorized “Data” and cover a wide spectrum of data management activities. The tasks included are Characterize Data, List Data, Rank Data, Random Sample, Sort Data, Table Attributes, and Transpose Data. Each will be described below.
Clicking the button on the right side of “Select a Data Source” will allow you to navigate to whatever table you need in your SAS libraries.
When you click on the Options tab, these are the customizations you can add / remove. As you select / deselect options, the code that you see on the right of the screenshot updates automatically. For the purposes of this post, I’ve kept all selected.
Here is a bit of the code that was automatically generated by SAS:
Here is a little bit more of the code:
The images below are a sample of the results; please note that as the CLASS dataset is not very exciting, the results are uninteresting – but it does prove the functionality available.
The next Data Task is Listing Data. You’ll note the different roles you can specify variables for, and can sort / rearrange the variables as needed.
Here’s the code that is automatically generated; this is the full code (unlike the previous example, which was truncated).
Here are the SAS results, where the data is grouped by the age of the students:
The third task is ranking data, and the order of the screenshots is the same as above: information entered, options, code, and finally results.
The results are in table format rather than the HTML output in the previous examples. I assume that this was done because this is more of a data management task than an analytical one. This is also indicated by the fact that there is a new dataset created, in this case WORK.RANK.
Random samples are extremely useful in data management and data quality, and having a quick way to pull them is something that is extremely advantageous. In SAS University Edition, random sampling is very easy to accomplish.
The options are self-explanatory – number or percentage of rows, with or without duplicates, and a random seed number or without and the ability to specify where the new dataset will be saved.
The data set as created by SAS University Edition. The new variables are Total, AllocProportion, SampleSize, ActualProportion, SelectionProb, and SamplingWeight.
Although PROC SORT is, in its simplest form, the easiest of the PROCs, there are many options that users may not be aware of. The Options tab available in SAS University Edition makes it easier for the experienced user to learn new features, and for the novice SAS user to be able to see the automated code to learn from.
Here are the options that are available – most of which I didn’t even know about until I started this post!
An understanding of meta-data and thorough documentation are critical pieces of any data analyst’s role; having an easy way to accomplish this would be ideal. The SAS University Edition has a simple way of getting this data. Simply by specifying the dataset (and an impressive amount of auto-generated code), the data analyst has a complete record.
Here is the automatically generated code created by SAS. You’ll see PROC FORMAT, DATASETS, SQL, REPORT and SORT used.
The output; although not complete, the results set is impressive – especially considering all I had to do was select the dataset!
One feature that I have purposefully neglected to discuss until now is the “Information” tab. The Table Attributes task is one of the more complex ones available, as shown by the code screenshot. Because of this, I wanted to show the Information tab of this task – the amount of detail and documentation available is amazing, and covers all PROCs used within the Table Attributes task.
The last and final task I wanted to cover is the Transpose Data function. Fairly straightforward, I won’t bother showing the same screen shots as in previous examples, but I will show you the initial screen.
The functionality available within SAS University Edition is extraordinary. I am very excited that I am able to expose SAS Users to this very powerful and useful feature of SAS. Next week, I'll be posting the final three pieces to my series. Please contact me with any feedback or suggestions!
This is article #3 in a six-part series. Links to all of them are below: