- #1
oliverroth
- 5
- 0
Hi,
I have some experimental data as a function of time t and temperature T. I have done a least squares fit of the data with a function f=f(a1,a2,t,T) (the function is non linear in a1 and a2!). Optimization of e^2 = sum((yi-f(a1,a2,ti,Ti)^2) with Matlab's fminsearch gave me a1, a2 and the residual error^2 (e^2).
Now I need some estimation of the quality of the fit (something comparable to R^2 in linear regressions). What can I use for this purpose?
I think I can remember that e^2/(n-2) (n=sample volume) can be used to estimate the uncertainty of the fit. Am I right? If so, how is this quantity called and how can I interpret it (e.g. what statistical test is applicable?)?
Or is it necessary/better to calculate the covariance matrix?
I found somewhere that it can be calculated with:
e^2/(n-2)*C ^-1 with Cij=sum(df/dai*df/daj).
I guess, I have to evaluate the differentials df(t,T)/da1 and df(t,T)/da2 at the optimized a1 and a2 and sum over all combinations of ti and Ti: Cij=sum(sum(df(ti,Ti)/dai*df(ti,Ti)/daj)); right??
Thanks for any help !
I have some experimental data as a function of time t and temperature T. I have done a least squares fit of the data with a function f=f(a1,a2,t,T) (the function is non linear in a1 and a2!). Optimization of e^2 = sum((yi-f(a1,a2,ti,Ti)^2) with Matlab's fminsearch gave me a1, a2 and the residual error^2 (e^2).
Now I need some estimation of the quality of the fit (something comparable to R^2 in linear regressions). What can I use for this purpose?
I think I can remember that e^2/(n-2) (n=sample volume) can be used to estimate the uncertainty of the fit. Am I right? If so, how is this quantity called and how can I interpret it (e.g. what statistical test is applicable?)?
Or is it necessary/better to calculate the covariance matrix?
I found somewhere that it can be calculated with:
e^2/(n-2)*C ^-1 with Cij=sum(df/dai*df/daj).
I guess, I have to evaluate the differentials df(t,T)/da1 and df(t,T)/da2 at the optimized a1 and a2 and sum over all combinations of ti and Ti: Cij=sum(sum(df(ti,Ti)/dai*df(ti,Ti)/daj)); right??
Thanks for any help !