Dear all,
I have several partially correlated explanatory variables that I want to
analyse using analysis of covariance.
The problem now is that order in model specification matters. I would
therefore like to have an automated routine which permutates the
positions of the explanatory variables, and then compares all resulting
model versions using AIC.
What I´d like to do is something like:
explanatories_c(explanatory.1,explanatory.2,explanatory.3....explanatory.n)
for (i in 1:n) explanatory[i]_sample((explanatories[i])
model[i]_aov(response~explanatory[i])
AIC(model[i+1],model[i])
this whole procedure would then be replicated until the full nr of
explanatory variables (say, 10) is tested in all possible positions
(e.g. 10!)
I would really appreciate any suggestions on this.
Best regards
Christoph.
|