nonlinear curve fitting - propagation of data uncertainties to nlpredci confidence intervals?
8 views (last 30 days)
Show older comments
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'?
0 Comments
Accepted Answer
Matt J
on 25 Nov 2013
Edited: Matt J
on 25 Nov 2013
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.
2 Comments
Matt J
on 27 Nov 2013
Edited: Matt J
on 27 Nov 2013
I doubt the random variation in X_i is accounted for at all. For that, you would have to be doing some sort of Total Least Sqaures approach.
Furthermore, I'm guessing that the CI calculation is based on the following approximation to the Cov matrix of the parameters
pinv(J)*Cov(Y)*pinv(J).'
where J is the Jacobian and Cov(Y) is the covariance matrix of Y. The question is how the residuals are used by NLPARCI to approximate Cov(Y). Possibly residuals(i) are averaged over i leading to the approximation,
Cov(Y)=mean(residuals)*eye(N);
However, if you have a better approximation of Cov(Y), you could probably do your own calculation with that instead.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!