Message-ID: <50496.63.125.5.171.1140309789.squirrel@webmail.ms.unimelb.edu.au>
Date: 2006-02-19T00:43:09Z
From: Andrew Robinson
Subject: Changing predictor order in lm()
Dear community,
can anyone provide a snippet of code to force the lm() to fit a model with
terms in the formula in an arbitrary order? I am interested in something
like:
lm(y ~ A * B + C, data=data)
where the interaction of A and B should be in the formula before C. My
goal is to simplify my presentation of models using the anova() statement.
I have found that this should be possible using the terms.formula()
function, but if anyone has an example that would be much appreciated.
Cheers
Andrew
Andrew Robinson
Senior Lecturer in Statistics Tel: +61-3-8344-9763
Department of Mathematics and Statistics Fax: +61-3-8344 4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson at ms.unimelb.edu.au Website: http://www.ms.unimelb.edu.au