Dear All,

Let have 10 pair of observations, as shown below.

######################
x <- 1:10
y <- c(1,3,2,4,5,10,13,15,19,22)
plot(x,y)
######################


Two fitted  models, with ranges of [1,5] and [5,10], can be easily fitted 
separately by lm function as shown below:

#######################
mod1 <- lm(y[1:5] ~ x[1:5])
mod2 <- lm(y[5:10] ~ x[5:10])
#######################

I'm looking for the interception points between these two straight lines from 
these fitted models, mod1 and mod2. 

Could someone advice me the way to do it?

Thank you
Fir 




______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to