Significant Difference between two linear regression models 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
 A: I think anova(A, B) is not meaningful here since you are comparing models fitted to different datasets.
It seems to me that you are asking whether weight responds differently in people < 30 year-old vs people > 30 year-old while taking height into account. If so, you want to assess the effect of interaction between height and age, like:
fit <- lm(weight ~ age * height, data=mydata)
summary(fit)

where age is a dichotomous variable with two levels (<30, >30). That is, you are asking: how different is the slope of the regression line of height vs weight in <30 compared to the slope of height vs weight in >30?
As an aside, I wonder whether you actually need to dichotomize age since in doing so you reduce the information contained in the dataset.
A: Adding to dariober's answer(*), I think it would be better to check if a first order effect of age on weight is present.
fit1 <- lm(weight ~ height, mydata)
fit2 <- lm(weight ~ age + height, mydata)

summary(fit2)
anova(fit1, fit2)

Without 1st order effects, don't try to find 2nd order ones. If any are found, they are spurious findings. But if there are reasons to believe that age has an effect on weight fit a model with the second order, interaction age*height.
fit3 <- lm(weight ~ age * height, mydata)

anova(fit1, fit3)  # redundant
anova(fit2, fit3)  # this is the one you want.


(*) The last sentence alone deserves an extra upvote.
