a method of finding the sum of the residuals from an orthogonal regression line

Asked 2 years ago, Updated 2 years ago, 40 views

I'd like to find the sum of the residuals from the orthogonal regression line.
It seems that the sum of the residual squares of linear regression is found in deviance(lm(d[,1]~d[,2]), but how should I find it in the case of orthogonal regression?

The orthogonal regression line was found as follows:

r<-prcomp (~d[,1]+d[,2])
slip<-r$rotation[2,1]/r$rotation[1,1]
intercept<-r$center[2]-slope*r$center[1]

r

2022-09-30 18:30

1 Answers

install.packages('deming')
library (deming)


fit<-deming(d[,1] to d[,2])
fit$residuals


2022-09-30 18:30

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.