Routines for fitting kinetic models to chemical degradation data