Treatment FAQ

how to check if one treatment age group older sas

by Solon Lebsack Published 3 years ago Updated 2 years ago
image

How do you find the current age in SAS?

To compute current age (age at the time your SAS program runs), you simply find the difference between the current date and the birth date. The TODAY function returns the current date as a SAS date value. So to compute current age, you would insert the TODAY function in place of the ending date for any of these methods.

How to group age values by age and age_grouping?

age_grouping = put (age, age_fmt.); ga_grouping = put (age, ga_fmt.); That adds two character variables to your data set (AGE_GROUPING and GA_GROUPING), holding the results of grouping the original AGE values by applying your formats.

What is the error code for agegroup?

NOTE: Format AGEGROUP has been output. ERROR 180-322: Statement is not valid or it is used out of proper order. NOTE: The previous statement has been deleted.

Is there anything wrong with using SAS user library?

There is nothing wrong with what you are attempting. However placing your data in the SASUSER library is not a best practice. Your SASUSER can be completely replaced by a SAS upgrade an your data sets are not going to survive. Better would be to create your own permanent library.

image

Is working with dates always tricky?

Working with dates is always tricky and you should always check your results.

Does YRDIF count leap years?

Yes, yrdif accounts for leap years! It takes the approach that one born on Feb 29 of a leap year ages another year on Feb 28 of a non-leap year.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9