A student posed a question: she has observations from two, independent groups for variables Y
and X
. She drops them on a Y~X
plot, asks the console to make separate lines for both groups (call this variable G
), and asks "how do I test if the two lines are significantly different?"
I suggest the following: Make linear regression models Y~X
for both groups, then use something like ANCOVA.
My P.I. buds in and suggests the following: Create a single multiple regression model of the form Y~X*G
which results in $Y=\beta_0 + \beta_1X + \beta_2G + \beta_3XG$. From this, he says without really explaining, you can derive two separate (presumably independent) regression lines which you can plot, and then perform tests on.
My question is: am I going insane or is he completely wrong? Can singular regression really be inferred from multiple regression like that? And what should I recommend to the student?