Fitting using weights which are not standard deviation

Hi,

I have a question regarding weighted fitting, and will really appreciate any help.

I have a set of data from several different cells, and each cell has different number of data points (say, voltage vs temperatures for several cells). Now I want to impose a single sigmoid fit to all these data (voltage vs temperature), but it will only be reasonable to give the same weight to each cell for this fit.

A weight wave can be assigned in the Curve Fitting dialogue. However, according to how fitting is done by calculating chi-square, the weight wave is interpreted as a form of standard deviation. What can I do if the weighting I want to use is not a measurement error?

Here is a passage from the Help document which seems to be relevant, but I don't really understand:

"In some cases, it is desirable to use weighting but you know only proportional weights, not absolute measurement errors. In this case, you can use weighting and after the fit is done, calculate reduced chi-square. The reduced chi-square can be used to adjust the reported error estimates for the fit coefficients."

Thank you very much in advance!

Allen
hiallen72 wrote:
I have a set of data from several different cells, and each cell has different number of data points (say, voltage vs temperatures for several cells).


Here's an idea for a workaround: interpolate the original data so that all the cells have the same number of data points used for the fit.
I think the procedure outlined in the section your quote comes from should be appropriate. Prepare a weighting wave that, for instance, might have something like 1/N (N=number of data points) as the weighting. Then adjust the errors after the fit as described in "Proportional Weighting".

I should add that my suggestion of 1/N weighting is only a suggestion. I don't know if it is the appropriate way to accomplish what you want to do. There may be some other weighting that is more accepted by statisticians.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Dear Ajleenheer,
Thank you for your suggestion. A concern of this workaround is that there's nonlinear relationship (between V and T) in this dataset, which would make a simple interpolation problematic.

Dear John,
It's not clear to me what "adjust the errors after the fit" means. The original passage in the Help says:
"The reduced chi-square can be used to adjust the reported error estimates for the fit coefficients"

Doesn't it mean the reduced chi-square (how this is calculated is not clear to me either) is used to adjust the "error estimates" for fit coefficients, instead of the fit coefficients themselves?

Big thanks!

Allen
DisplayHelpTopic "Proportional Weighting"

Read all the way through, including the example. What you need is at the end:
Variable reducedChiSquare = V_chisq/(V_npnts - numpnts(W_coef))
Duplicate W_sigma, reducedSigma
reducedSigma = W_sigma*sqrt(reducedChiSquare)


John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi John,

DisplayHelpTopic "Proportional Weighting" returned "the topic was not found after searching all Igor help files in the Igor Pro folder and subfolders". My Igor version is 6.1.2.1 (6.12A). Is this a version thing?

Thanks!

Allen
Same error message for IP6.38.
Here is the part from the IP7 help:

Proportional Weighting


In some cases, it is desirable to use weighting but you know only proportional weights, not absolute measurement errors. In this case, you can use weighting and after the fit is done, calculate reduced chi-square. The reduced chi-square can be used to adjust the reported error estimates for the fit coefficients. When you do this, the resulting reduced chi-square cannot be used to test goodness of fit.
For example, a data set having Gaussian errors that are proportional to X:
Make data = exp(-x/10) + gnoise((x+1)/1000)
Display data
Prepare a weighting wave that has weights proportional to X, but are not equal to the true measurement errors:
Duplicate data, data_wt
data_wt = x+1 // Right proportionality with X, but 1000 times too big
The fit has pretty meaningless coefficient errors because the weights provided were proportional to the true measurement errors, but 1000 times too big:
CurveFit/NTHR=0 exp data /W=data_wt /I=1 /D
Fit converged properly
fit_data= W_coef[0]+W_coef[1]*exp(-W_coef[2]*x)
W_coef={0.0044805,0.99578,0.10063}
V_chisq= 0.000117533;V_npnts= 128;V_numNaNs= 0;V_numINFs= 0;
V_startRow= 0;V_endRow= 127;
W_sigma={5.78,5.74,1.15}
Coefficient values ± one standard deviation
y0 =0.0044805 ± 5.78
A =0.99578 ± 5.74
invTau =0.10063 ± 1.15
So now we compute reduced errors based on reduced chi-square:
Variable reducedChiSquare = V_chisq/(V_npnts - numpnts(W_coef))
Duplicate W_sigma, reducedSigma
reducedSigma = W_sigma*sqrt(reducedChiSquare)
The resulting errors are more reasonable:
Print reducedSigma
reducedSigma[0]= {0.00560293,0.0055649,0.00111907}
Note that, as with any non-linear fitting, Gaussian statistics like this are not really applicable. The results should be used with caution.

HJ