开发者

Total Least Square method using R [duplicate]

开发者 https://www.devze.com 2023-03-25 09:45 出处:网络
This question already has answers here: Closed 11 years ago. 开发者_开发百科 Possible Duplicate: How to calculate Total least squares in R? (Orthogonal regression)
This question already has answers here: Closed 11 years ago. 开发者_开发百科

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消