Uncertainties and confidence intervals for both linear and nonlinear regression

13 views (last 30 days)
Hi,
I want to know if there exists a Matlab function that computes the uncertainty in the slope for a linear regression and its confidence interval.
Besides, I'm working with nonlinear regression (using nlinfit). I know that nlparci provides the confidence interval of each estimated parameter but how can I compute the uncertainty of such parameters?
Thanks in advance.
  1 Comment
Tao Sympoh
Tao Sympoh on 10 Dec 2018
Hi Efren,
Finding out the uncertaity of slope and intercept in a linear regression using least-sqaure fitting is a solved problem. You can check this link for some detail: https://www.chem.utoronto.ca/coursenotes/analsci/stats/ErrRegr.html
It is in fact a problem of error propagation from the uncertainty of data to that of the parameters.
Hope this helps!

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 11 Mar 2014
I am not sure what do you mean by ‘the uncertainty of such parameters’?
The standard deviations of the estimated parameters are the square roots of the diagonals of the estimated variance-covariance matrix. In the nlinfit documentation, this is CovB.
The confidence interval (95% is the default) is the probability that the uncertainty of the parameter estimate includes zero. If it does (one of the confidence bounds is positive and the other negative), then that parameter is not needed in the regression model with the data you supplied to it. The confidence interval is therefore more meaningful than the variance or standard deviation.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!