Is there a way to perform linear regression in MATLAB 7.9 (R2009b) when the uncertainity in data is known?

1 view (last 30 days)
I would like to know if there is a way to perform linear regression on the data where the uncertainity in data is known. Say, I have the following data,
x = [2-+0.27, 1.9-+0.17, 3.9-+0.01, 0.5-+0.01, ...]
y = [5-+1.25, 3.1-+0.16, 3.2-+0.01, 2.5-+0.01, ...].
I would like to perform linear regression on this data.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
There is no direct way to perform linear regression in MATLAB when the uncertainity in data in known. However,Principal Components Analysis can be used to fit a linear regression that minimizes the perpendicular distances from the data to the fitted model. This is the linear case of what is known as Orthogonal Regression or Total Least Squares, and is appropriate when there is no natural distinction between predictor and response variables, or when all variables are measured with error. This is in contrast to the usual regression assumption that predictor variables are measured exactly, and only the response variable has an error component.
The Statistics Toolbox documentation includes and example "Fitting an Orthogonal Regression Using Principal Components Analysis" that demonstrates this concept.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!