Solved – Averaging data then fitting vs fitting then averaging in non-linear regression

errorfittingmeannonlinear regressionregression

I have a very similar problem like in this question. The difference is that I am dealing with non-linear regression. Moreover, the answer to that question suggests that there should be no difference between fitting to averaged data vs averaging the values from independent fits – in my case I get different results for the same data, so the answer is not valid in my case.

Suppose I have to obtain a single parameter from experimental data using non-linear regression analysis. I have performed multiple repetitions of the experiment, so I have multiple values for each data point.
I have two possibilities to obtain the desired parameter:

  1. Perform the fitting for each data set, then average the obtained parameter
  2. Average the data, then perform a single fitting

Each approach gives me a different value of the parameter. Clearly, one number must be closer to the true value of the parameter. Which one is valid? Intuitively, when I perform each measurement on separate occasions/days, the first approach seems more reasonable, because the data are independent. However, if I collect the data in a single experiment so the data may be at least partially dependent, the second approach appears more valid. Is there a mathematical argument on which approach is correct?

EDIT: I have a feeling that it doesn't matter what sort of curve I am fitting to, the answer should be correct in general. Anyway, my function is:$$A=A_0-A_0\ \frac{C}{C+k}$$ where $C$ is the independent variable, $A_0$ is fixed and $k$ is the fitted parameter. I am using a global fitting with Levenberg–Marquardt method for several datasets (each datased have a different $A_0$ value). Both $C$ and $A_0$ can have errors. The number of points in each dataset is usually $5$. The number of datasets is $5$ to $10$.

Best Answer

The estimations under the first approach should asymptotically converge to the outcome of the second approach, could you check that in your experiment increasing the number of simulations and checking if there is convergence on the estimations?.

Let me give you this intuitive example. I am not sure what method you are using to fit your data, but let's think you are looking for the MLE. In the first case what you are doing is to give at each simulation same 'importance' whereas in the second case, where you would have just one single likelihood function for all data sets, what you are doing is weighting your simulations, giving more importance to the most likely ones.

Related Question