Snipplr
http://snipplr.com/language/sas/tags/number
Recent snippets posted on Snipplr.comen-usFri, 06 Mar 2015 13:47:44 GMT(SAS) Random Sample Selection - sarathannapareddy
http://snipplr.com/view/34215/random-sample-selection/
Last week my manager asked me to randomly pick 10%observations from a large data set and then create a listing so that the Data management programmers can QC the data. I want to share some thoughts here … how easy and simple to do random sampling.
Approach 1:
Data step Approach: In this approach, the observations are shuffled using the RANUNI function which assigns a random number to each observation. ]]>Tue, 11 May 2010 10:40:28 GMThttp://snipplr.com/view/34215/random-sample-selection/(SAS) How to calculate number of years and number of days between 2 dates; - sarathannapareddy
http://snipplr.com/view/18283/how-to-calculate-number-of-years-and-number-of-days-between-2-dates/
Exploring the yrdif and datdif functions in SAS as well as INTCK function:
There are several ways to calculate the number of years between two dates and out of all the methods, YRDIF function results the most accurate value.
Syntax:
ageinyrs = YRDIF(birthdate, enddate, 'act/act');
ag_indays = DATDIF(birthdate, enddate, 'act/act');
Read more at: http://studysas.blogspot.com/2009/03/how-to-calculate-number-of-years-and.html ]]>Thu, 13 Aug 2009 17:15:50 GMThttp://snipplr.com/view/18283/how-to-calculate-number-of-years-and-number-of-days-between-2-dates/