2k views

### How to find straight line minimizing the sum of squares of Euclidean distances from the points? [duplicate]

I have recordings of intensities of two fluorescent antibodies on a 2d image $2^{10} \times 2^{10}$ pixels in size, giving me $2^{20}$ pairs of numbers. What is the best way to find the best ...
• 1,127
2k views

### prcomp() vs lm() results in R [duplicate]

I have a simple matrix: [,1] [,2] [,3] [1,] 1 2 3 [2,] 4 5 6 [3,] 7 8 9 [4,] 10 11 12 I have to calculate linear regression ...
• 2,637
466 views

### Multiple orthogonal regression in R [duplicate]

I have a project in which I need to perform orthogonal regression in a multiple regression case. For the non-multiple case, I've found Teetor's R Cookbook suggests using principle components: ...
• 1,118
65 views

### How do I get from the eigenvectors of the covariance matrix to the regression parameters? [duplicate]

I have a linear regression problem $$y = a x + b$$ with errors on $x$ and $y$ that are uncorrelated and unitary and I have to find $a$ and $b$. To do this, I want to use principal component ...
1 vote
54 views

### Programming Multiple Variable PCA Ratios [duplicate]

I would like to generalize Paul Teetor's A Better Hedge Ratio, which uses prcomp() to determine the orthogonal regression ratio between two variables. I am hoping to generalize this to multiple ...
• 249
908k views

### Making sense of principal component analysis, eigenvectors & eigenvalues

In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues. I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like ...
• 13.5k
1k views

### Are there useful applications of SVD that use only the smallest singular values?

In a number of singular value decomposition (SVD) applications, for example Latent Semantic Indexing, only the biggest singular values are used to make searches and calculate distances. Are there ...
• 193
6k views

### 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 ...
• 391
8k views

### 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 ...
• 93
3k views

### 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 ...
• 163
1k views

### Standard error of the intercept in orthogonal regression

I want to perform a univariate regression but with substantial measurement error in both $x$ and $y$. I therefore want to try orthogonal regression with R. The best answer to my question so far have ...
1k views

### Total least squares with weights [duplicate]

I am looking for a way to perform weighted total least squares in R. I know one can use PCA for this as described nicely in the following post. How to perform orthogonal regression (total least ...
• 321
427 views

### Curve fitting in the presence of prior beliefs about the relationship between x and y

In the figure which follows each dot represents a game of a particular sport. The x-axis represents the home team's margin of victory, and so around the top-right we can see a game where a home team ...
602 views

### Confidence/prediction intervals for total least squares regression

I am learning the ropes of total least squares regression and I found this thread How to perform orthogonal regression (total least squares) via PCA? where the answer by @amoeba, together with some R ...
• 203
1 vote