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:
- Perform the fitting for each data set, then average the obtained parameter
- 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$.