I want to fit a total least squares model where the errors have spatial structure according to a matrices $Sigma_{x}$ and $Sigma_{y}$. Is there any freely available/accessible code out there for it.
In python I’ve found:
ord (https://docs.scipy.org/doc/scipy/reference/odr.html)
which cannot account for spatial structure in errors,
and in R, I’ve found:
tls (https://cran.r-project.org/web/packages/tls/tls.pdf)
deming (https://cran.r-project.org/web/packages/deming/deming.pdf)
pracma::odregress (https://cran.r-project.org/web/packages/pracma/pracma.pdf)
MethComp::Deming (https://cran.r-project.org/web/packages/MethComp/MethComp.pdf)
and a few more I can’t find now, but none of them have ever allowed for correlated errors. To clarify, I do not have the errors of Y and X correlated with each other, rather the error of $y_{i}$ is correlated with $y_{j}$ and the error of $x_{i}$ is correlated with $x_{j}$.
An ideal solution would be software/code which given known error matrices, can calculate the parameters the regression and assess their statistical significance.
thank you.