SAS

Estimating and modelling relative survival using SAS

This page describes SAS (version 7) code I made public in 2004. I was a heavy SAS user in the 1980s and 1990s, but from the turn of the century I moved to Stata.

SAS Tips: Accurately calculating age in only one line

Accurately calculating age in only one line

SAS Tips: autocall libraries

An autocall library contains files that define SAS macros. If you regularly use user-written SAS macros, it is efficient to store these macros in a separate directory

SAS Tips: Calculating age at diagnosis from date of birth and diagnosis date

Calculating age at diagnosis from date of birth (extracted fron Swedish ID number) and diagnosis date

SAS Tips: Categorising a continuous variable into quantiles

Three approaches for categorising a continuous variable into quantiles.

SAS Tips: Converting variable types from character to numeric (and vice versa)

Converting variable types from character to numeric (and vice versa)

SAS Tips: Customised notes and warnings

How to use customised notes and warnings in the SAS log

SAS Tips: Data step processing within by groups

Illustration of the FIRST. and LAST. variables for data step processing within by groups.

SAS Tips: Estimating ratios of proportions (risk ratios)

Approaches to estimating ratios of proportions (risk ratios)

SAS Tips: Formats and Informats

SAS Formats and Informats