How to judge a series of linear regressions are parallel? Assume there are three groups of data:
x1 = [1, 2, 3, 4, 5]; y1 = [2.1, 4.3, 6.7, 8.2, 10.3]

x2 = [2, 4, 6, 8, 10]; y2 = [4.1, 8.25, 12.21, 16.33, 20.47]

x3 = [1, 3, 5, 7, 9]; y4 = [2.08, 6.23, 10.11, 14.27, 18.63]

We could get three linear equations from such data by using python or R:
y1 = 2.03x1+0.23

y2 = 2.04x2+0.027

y3 = 2.057x3-0.021

It seems we could conclude that these three linear regressions are parallel because their slope is fairly close to 2. But I have no idea whether or not there is a convenient approach to prove my guess.
I have tried to use chow-test, but chow-test is always used in time-series data. I have also tried to use ANCOVA, but I'm not sure whether or not it is valid.
Can someone provide me another method to test such linear regressions are parallel? Or give me some advice about how to use the chow-test or ANCOVA to prove my guess? Thank you for your helping.
 A: You can make use of separate regression for each group and linear hypothesis test in car package as follows:


*

*pool the data into one data frame; 

*assign for each group id value; 

*make linear model with x nested withinid (/ in lm formula); 

*check linear hypothesys that regression coefficients equal each other.


Please see the code below:
x1 <- c(1, 2, 3, 4, 5)
y1 <- c(2.1, 4.3, 6.7, 8.2, 10.3)
x2 <- c(2, 4, 6, 8, 10)
y2 <- c(4.1, 8.25, 12.21, 16.33, 20.47)
x3 <- c(1, 3, 5, 7, 9)
y3 <- c(2.08, 6.23, 10.11, 14.27, 18.63)

df <- data.frame(id = unlist(lapply(letters[1:3], rep, 5)), x = c(x1, x2, x3), y = c(y1, y2, y3))
m <- lm(y ~ id / x, data = df)    

library(car)
linearHypothesis(m, c("ida:x = idb:x", "idb:x =idc:x"))

Output:
Linear hypothesis test

Hypothesis:
ida:x - idb:x = 0
idb:x - idc:x = 0

Model 1: restricted model
Model 2: y ~ id/x

  Res.Df     RSS Df Sum of Sq      F Pr(>F)
1     11 0.27933                           
2      9 0.27100  2 0.0083289 0.1383 0.8727

# Not rejected

