8. Advanced methods for fitting models