Questions tagged [total-least-squares]

A technique to estimate parameters $\beta$ of the linear model $Y=X\beta$ when both $Y$ and $X$ are subject to measurement error. Includes Orthogonal and Deming regression as special cases.

TLS is a technique to estimate parameters $\beta$ of the linear model $Y=X\beta$ when both $Y$ and $X$ are subject to measurement error. This is in contrast with ordinary least squares (OLS) regression where $X$ is assumed to be known exactly. Some special cases of TLS are known as orthogonal regression (single $x$ and single $y$) and Deming regression (single $x$ and $y$ but with different error variances; it is an example of weighted TLS).

60 questions
31
votes
3 answers

How to perform orthogonal regression (total least squares) via PCA?

I always use lm() in R to perform linear regression of $y$ on $x$. That function returns a coefficient $\beta$ such that $$y = \beta x.$$ Today I learned about total least squares and that princomp() function (principal component analysis, PCA) can…
Dail
  • 2,147
  • 12
  • 40
  • 54
14
votes
2 answers

Does a correlation matrix of two variables always have the same eigenvectors?

I perform Principal Component Analysis using two variables that are standardized. This is done by applying a SVD on the correlation matrix of the concerned variates. However, the SVD gives me the same eigenvector (weights) irrespective of what the…
MaHo
  • 391
  • 2
  • 11
10
votes
1 answer

When to use Deming regression

I am currently working on a way to transform two different phosphorus test values into each other. Background There exist many (extraction) methods to measure plant available phosphorus in soil. Different countries apply different methods, hence to…
asugila
  • 101
  • 4
9
votes
2 answers

Is it possible to calculate R-squared on a total least squares regression?

I am using the Deming function provided by Terry T. on this archived r-help thread. I am comparing two methods, so I have data that look like this: y x stdy stdx 1 1.2 0.23 0.67 2 1.8 0.05 0.89 4 7.5 1.13 0.44 ... ... ... …
Nico Coallier
  • 301
  • 3
  • 11
9
votes
1 answer

Fitting a plane to a set of points in 3D using PCA

I am trying to estimate a midplane of a 3D model using the midpoints of paired landmarks, in order to reconstruct missing data (midplane refers here to the middle/saggital plane of the cranium which cuts the skull into two symmetrical halves, left…
Suzy
  • 93
  • 1
  • 3
7
votes
0 answers

What techniques are there to measure goodness of fit of Deming (orthogonal) regression?

Questions: Even if there is no "widely accepted" technique, is there a useful-and-above-average technique for estimating goodness of fit in orthogonal regressions? What are the pros/cons of this technique? Background and Motivation: I recently…
NOTM
  • 113
  • 9
6
votes
1 answer

Nonlinear total least squares / Deming regression in R

I've been using nls() to fit a custom model to my data, but I don't like how the model is fitting and I would like to use an approach that minimizes residuals in both x and y axes. I've done a lot of searching, and have found solutions for fitting…
5
votes
0 answers

Total least square intuition

I have yet to find a good intuitive explanation of TLS. Online resources tend to focus on the vertical vs. perpendicular square error pictures (I don't need to see perpendicular lines to understand what that means) and quickly move to PCA formulas…
4
votes
2 answers

Why does the total least squares line in 2D pass through the average across all data points?

I have $N$ data points $\mathbf{m_k}$ and I want to fit a line through them with minimal error $$J = \sum_k^N ||\mathbf{m_k^*} - \mathbf{m_k}||^2 = \sum_k^N ||\mathbf{m_0} + a_k\mathbf{e} - \mathbf{m_k}||^2.$$ $\mathbf{m_k^*}$ is the point on the…
user2740
  • 1,226
  • 2
  • 12
  • 19
4
votes
0 answers

What's the shape of confidence interval for linear regression estimated through TLS (total least squares)?

So, we know the shape of confidence intervals for vanilla linear regression estimated through OLS (ordinary least squares): Shape of confidence interval for predicted values in linear regression. In a univariate scenario I'm working right now…
Firebug
  • 15,262
  • 5
  • 60
  • 127
4
votes
2 answers

Find best fit diagonal matrix for error minimization

I want a set of input values to be as similar to the output values as possible. I have an input matrix X (m*n) that has m data points and n dimensions for each data point. I also have an output matrix Y (m*n) that has m data points and n…
3
votes
0 answers

Coefficient of determination of a orthogonal regression

Context I must find the general form of a linear equation. The $X$ and $Y$ values are the location coordinates of touches on a screen. I want to find the best fit line, described by equation $mX + nY + p = 0$ , so I need to find $m, n, p$. I want to…
3
votes
2 answers

Including model uncertainty in non-linear least squares minimization

The problem I have experimental data $Y$ with heteroscedastic and normally distributed uncertainties characterized by covariance matrix $C_{exp}$. I want to fit the data using model $F(X, \beta)$ where $F$ is a nonlinear function mapping…
3
votes
2 answers

Why my Deming Regression line change so much when switching variables? If they seem to be a linear relationship betwen them?

I am trying to fit a line that best predicts the production of energy Y given the speed of wind X, a typical Y = xm + b , using deming regression. I am looking for the slope and the intercept of that line using the following formula: I assume…
3
votes
1 answer

Generating Random Data Sets for Linear Regression with Random Slope and Error Term in R

I want to test the effects of sample size on Deming regression using simulated paired data in R. As the data are paired, the expected slope value should be 1 and the intercept 0. The code I have so far is: x <- runif(16,0,25) y <-…
1
2 3 4