Posts Tagged ‘ code ’

Practical MD5 in SAS

December 4, 2013
By

This guide introduces MD5 and hash functions in general, lists common uses for hash functions, gives advise on how to best use MD5 in SAS, and covers common issues.
Read more »

Tags: , , , ,
Posted in SAS | Comments Off

Email address normalization in SAS

December 3, 2013
By

This SAS macro performs email address normalization by changing email addresses like [email protected] to the canonical form [email protected] Also, it demonstrates basic unit testing in SAS, which ensures quality and eases code mainten...
Read more »

Tags: , ,
Posted in SAS | Comments Off

Get free disk space in SAS on Windows

August 8, 2013
By

This SAS macro retrieves the amount of free disk space, and puts the value in the SAS log and in a global macro variable. It works with local and remote drives and mapped and UNC paths. To avoid data loss, use it as a sanity check to verify there is ...
Read more »

Tags: , ,
Posted in SAS | Comments Off

Calculate RMSE and MAE in R and SAS

July 12, 2013
By

Here is code to calculate RMSE and MAE in R and SAS. RMSE (root mean squared error), also called RMSD (root mean squared deviation), and MAE (mean absolute error) are both used to evaluate models. MAE gives equal weight to all errors, while RMSE gives...
Read more »

Tags: , , , , , ,
Posted in SAS | Comments Off

Date and datetime: accuracy vs storage and I/O costs (SAS)

March 12, 2013
By

How much storage space and I/O resources can be saved by using the LENGTH statement to shrink the storage of date and datetimes while maintaining sufficient precision? In my experience, saving I/O generally makes SAS run faster (such as in a DATA step)...
Read more »

Tags: , ,
Posted in SAS | Comments Off

Data about each month (SAS)

February 27, 2013
By

A SAS code to generate information about each month such as the number of days in the month, week days, hours, work hours, etc. using intck and intnx function. It's also a good example of using a DATA step to generate a data set without an input data ...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Dummy coding in SAS

February 11, 2013
By

Here is a macro to generate binary features (also called dummy coding) from a nominal variable (also called a categorical variable, such as eye color). The automation saves time and avoids mistakes when there are many possible values to a category or ...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Easy sortable HTML tables in SAS ODS

January 18, 2013
By

Today Charlie Huang posted a SAS HTML table sorting demo, but without automation. Here is a fully automated implementation in SAS. The developer does not need to manually edit the HTML, and the user simply clicks any column and it sorts instantly clien...
Read more »

Tags: , ,
Posted in SAS | Comments Off

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: [email protected]

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.