I'm trying to predict weight based of age and height for people under 30 and people 30+
I have the original data set mydata
I have then created two subsets mydatalessthan30 and mydata30plus
Then I have
A = lm(mydatalessthan30$weight ~ mydatalessthan30$age + mydatalessthan30$height)
B = lm(mydata30plus$weight ~ mydata30plus$age + mydata30plus$height)
I then want to check if there is a significant difference between the models, how should I do this?
I have tried Anova(A,B) but this doesn't work