Fits a model to activity data