MATLAB: Nonlinear curve fitting – propagation of data uncertainties to nlpredci confidence intervals

lsqcurvefit nlparci propagationMATLAB

Hi! I'm trying to fit a nonlinear function that has several parameters, some partially correlated. For simplicity, let's say the function is something like y = x * alpha^x, and the parameter to be fitted is alpha. The data are vectors X and Y. The data have measurement uncertainties that are Gaussian distributed, not correlated, and can have different standard deviations for each x_i or y_i.
I used LSQCURVEFIT to estimate 'alpha' for a given dataset, without applying weights (which ideally I'd like to do, but in R2010a the similar function NLINFIT does not support yet the 'Weights' parameter).
In any case, LSQCURVEFIT finds the best-fit 'alpha' and returns the residuals and a Jacobian. NLPARCI then can compute a 68% confidence interval for 'alpha'.
However, this 68% CI for 'alpha' is just for the unweighted fit itself.
How to get original uncertainties in both X and Y propagated into the 68% CI estimate of 'alpha'?

Best Answer

How to get original uncertainties in both X and Y propagated into the 68% CI estimate of 'alpha'?
Since alpha, the residuals, and the Jacobian are derived from X and Y, whatever uncertainty was originally in X and Y should already have had its impact on them.