Skip to content

Interception point between two lines

2 messages · FMH, Uwe Ligges

FMH
#
Dear All,

Let mod2 and mod3 are two regression equations representing two distinct lines and i'm keen to find the intreception point between these two lines and?the?following are part of the codes.

???????? 
??? ???? m1 <- as.matrix(rbind(coef(mod2), coef(mod3)))
???????? a <- cbind(c(1,1), -m1[, 2])
???????? b <- m1[,1]
??? ???? c <- solve(a=a,b=b)

?Unfortunately, there is an error message?given as stated below?and i don't understand what it meants for.


'?Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) :?
system is computationally singular: reciprocal condition number = 1.14557e-16'


Could anybody advice me on this matter?

Thank you
Fir
#
On 05.01.2010 14:37, FMH wrote:
Yes, you cannot compute the intersection if it is (numerically) non 
existant, i.e. coef(mod2), coef(mod3) are almost linear dependent and 
the regression lines are almost parallel.


Uwe Ligges