Calculating R2 and f 2 values from the residual variance estimates can be automated by using the SAS output delivery system (ODS) to store the desired parameters in separate data sets, and subsequently using a merged dataset of variances to calculate R2 and f 2 using Eqs 3 and 2, respectively. The following syntax calculating R2 and f 2 for smoking quantity illustrates this: