title: ggplot2: How to plot an orthogonal regression line?
body: <p>I have tested a large sample of participants on two different tests of visual perception – now, I'd like to see to what extent performance on both tests correlates.  </p>
  
  <p>To visualise the correlation, I plot a scatterplot in R using <code>ggplot()</code> and I fit a regression line (using <code>stat_smooth()</code>).  However, since both my <code>x</code> and <code>y</code> variable are performance measures, I need to take both of them into account when fitting my regression line – thus, I cannot use a simple linear regression (using <code>stat_smooth(method="lm")</code>), but rather need to fit an orthogonal regression (or Total least squares).  How would I go about doing this?  </p>
  
  <p>I know I can specify <code>formula</code> in <code>stat_smooth()</code>, but I wouldn't know what formula to use. From what I understand, none of the preset methods (<code>lm, glm, gam, loess, rlm</code>) are applicable.</p>