I think I need an explanation about the nature of the summary when making a lm
on R.
Does someone could explain to me that:
When you make an analysis of variance on a lm
model (ex: aov(lm(Y~X1+X2)
), it is actually observed that when there is a collinearity between the explanatory variables, the order of entry of the variables in the regression model analysis is important because SCEs are calculated sequentially, so the first input variable will capture all the variance and the others less, so if you make the same model but whith this variables order: aov(lm(Y~X2+X1))
, the p.value
will change.
But I do not understand why, when you permut the order of entry of the variables on a lm
model as : Y~X1+X2
, the summary of the multiple regression model returns the slope coefficient estimates but why there is not the same kind of problem as the aov
? I mean why the slope coefficient are still the same when you permut the order of the variables:
Y~X1+X2
and Y~X2+X1
?