[R] 2k-factorial design with 10 parameters

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 30 13:20:33 CET 2004


On Tue, 30 Nov 2004, Sven wrote:

> I'd like to apply a 2^k factorial design with k=10 parameters. Obviously this 
> results in a quite long term for the model equation due to the high number of 
> combinations of parameters.
>
> How can I specify the equation for the linear model (lm) without writing all 
> combinations explicitly down by hand? Does a R command exist for this 
> problematic?

I assume you mean k=10 factors (there are a lot more parameters).

 	aov(y ~ .^10, data=mydata)

will do what you are probably asking, if you have a data frame with 
response y and the ten factors.  I'm not sure how you could analyse the 
1000 odd lines of output, so reduce 10 to something sensible (like 2 or 3)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list