We’re smarter together. Learn from this collection of community knowledge and add your expertise.

How to get started with SAS University Edition - Part 3

by Regular Contributor on ‎01-29-2015 08:37 PM - edited on ‎10-05-2015 03:14 PM by Community Manager (1,058 Views)

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.



Characterize Data

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, Ive 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.




List Data

  The next Data Task is Listing Data.  Youll note the different roles you can specify variables for, and can sort / rearrange the variables as needed.



Heres 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:



Rank Data

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 Sample

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.



Sort Data

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 didnt even know about until I started this post!



Table Attributes

An understanding of meta-data and thorough documentation are critical pieces of any data analysts 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.  Youll 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.



Transpose Data

The last and final task I wanted to cover is the Transpose Data function.  Fairly straightforward, I wont 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:


Your turn
Sign In!

Want to write an article? Sign in with your profile.