fit function

Fit a dose-finding model.