Discrete-time risk factor models applied to the AIDS epidemic