A MATLAB™ code to perform weighted linear regression with (correlated or uncorrelated) errors in bivariate data
- 494 Downloads
MATLAB™ is a powerful, easy to use, software package suitable for many mathematical operations, which finds plenty of scientific applications. One such application is the fitting of trend lines for a given data set so as to interpret the relationship of the variance of the parameters involved. We provide here a code in MATLAB™ that performs the weighted linear regression with (correlated or uncorrelated) errors in bivariate data which can handle ‘force-fit’ regression as well.
KeywordsWeighted linear regression Correlated errors Force fit Trend line Bivariate regression
Unable to display preview. Download preview PDF.
- Huesken, G. (2006) errorbar_x, MATLAB™ Central. http://www.mathworks.com/matlabcentral/fileexchange/12751, [accessed 17 December 2009].
- Pearson, K. (1901) On Lines and planes of closest fit to systems of points in space, Philosophical Magz., v.2(6), pp.559–572.Google Scholar