[R] Interception point between two lines

FMH kagba2006 at yahoo.com
Tue Jan 5 14:37:28 CET 2010


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






More information about the R-help mailing list