I am working with a chemical process that increases the amount of a substance linearly in time and the trend CANNOT have a negative rate (i.e. negative slope). I am conducting a study which includes many reactions of this type. Each reaction data set consists of x and y values where x is time and y is the amount of a substance. There is noise in the y response variable due to measurement error. When the response of the system is small relative to the measurement error (i.e. noise-dominated) it is possible for a least-squares fit to output a line with a negative slope. Although it is the "Best Fit" of the data, it is an impossible scenario for this system and therefore meaningless. My downstream analysis includes calculating the log(rate) which is -inf for rate=0 and is complex for any rate<0. I am forced to treat negative slopes like missing data as they do not have valid outputs. However, the scenarios that most interest me for my study are the ones with low response as I am trying to demonstrate that the reaction rate is very slow. As a result, I end up with about 50% unusable data sets that have negative rates even though it is behaving as I would hope.

So my question is, does anyone have any ideas for how I can use these data sets, perhaps by applying constraints to a linear fit to guarantee a positive slope?