Maximum Likelihood Fitting of General Risk Models to Stratified Data