Total Least Square method using R [duplicate]
Possible Duplicate:
How to calculate Total least squares in R? (Orthogonal regression)
I have to implement Total Least Squares model in R instead of lm() (linear regression)
Who don't understand what I mean, this link maybe be useful: http://en.wikipedia.org/wiki/Total_least_squares
Is there a R function for this kind of regression model?
Not sure there's a package but there's some code available here:
http://r.789695.n4.nabble.com/Total-least-squares-linear-regression-td1475960.html
You could also likely do a fairly inefficient search by using one of R's various and powerful optimization packages. Since from this article http://arxiv.org/PS_cache/math/pdf/9805/9805076v1.pdf it appears that the centroid always runs through the best fit line, you'd just be searching to find the angle that minimizes the sum of the squared Euclidian distances. Shouldn't be too hard, but that just gets you the fit not any diagnostics on the fit.
精彩评论