Abstract In this paper the computational aspects of testing the null hypothesis of homogeneity of relative risk against two-step alternatives are examined. This representation is the same as that introduced by Anderson and Senthilselvan (Appl. Stat. 31 (1982) 44–51), i.e. a two-step model. Such alternatives may be used to represent decay in effect or, perhaps, inversion of the regression effect or crossing hazards. For such models inferential aspects are slightly more involved than for instance with proportional hazards models having fixed effects, even when time dependent as in O'Quigley and Pessione (Biometrics 45 (1989) 135–144). The necessary techniques for carrying out tests based on the two-stage model have recently been developed (O'Quigley and Pessione (Biometrics (1990) (in press)) and in this paper we outline the necessary steps to be taken in the construction of algorithms to implement the proposed procedures. Programs enabling analyses based on the assumption of homogeneity of risk are very widely available. These include software packages such as BMDP, SAS, SPSS and GLIM. In the output of these packages, as well as that from most other standard routines, is contained all the necessary information to carry out the tests proposed by O'Quigley and Pessione. Here we detail the explicit formulae needed for carrying out the calculations in practice. The special cases of crossing hazards are considered in detail.