[R] compare two linear regression slopes

John Christie jc at or.psychology.dal.ca
Wed Aug 20 02:25:08 CEST 2003

On Tuesday, August 19, 2003, at 09:20  PM, Simon Blomberg wrote:

> You need to look at Analysis of Covariance in any basic stats book. 
> Basically, if you have y versus x for 2 groups ("group" is a factor), 
> use lm to fit the model:
> fit <- lm(y ~ group + x + x:group, data=your.dat)

but, my situation is two separate regressions with different collected 
Y's and a predicted X.

More information about the R-help mailing list