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.

Manage_image_1.png

 

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.

Manage_image_2.png

 

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.

Manage_image_3.png

 

Here is a bit of the code that was automatically generated by SAS:

Manage_image_4.png

 

Here is a little bit more of the code:

Manage_image_5.png

 

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.

Manage_image_6.png

Manage_image_7.png

Manage_image_8.png

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.

Manage_image_9.png

 

Heres the code that is automatically generated; this is the full code (unlike the previous example, which was truncated).

Manage_image_10.png

 

Here are the SAS results, where the data is grouped by the age of the students:

Manage_image_11.png

 

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.

Manage_image_12.png

Manage_image_13.png

Manage_image_14.png

Manage_image_15.png

 

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.

Manage_image_16.png

 

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.

Manage_image_17.png

Manage_image_18.png

 

The data set as created by SAS University Edition.  The new variables are Total, AllocProportion, SampleSize, ActualProportion, SelectionProb, and SamplingWeight.

Manage_image_19.png

 

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.

Manage_image_20.png

 

Here are the options that are available most of which I didnt even know about until I started this post!

Manage_image_21.png

 

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.  

Manage_image_22.png

 

Here is the automatically generated code created by SAS.  Youll see PROC FORMAT, DATASETS, SQL, REPORT and SORT used. 

Manage_image_23.png

 

The output; although not complete, the results set is impressive especially considering all I had to do was select the dataset!

Manage_image_24.png

 

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.

Manage_image_25.png

 

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. 

Manage_image_26.png

 

Conclusion

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.