On Sat, 2009-05-09 at 19:29 -0700, linakpl wrote: > If I was doing an ANOVA analysis how can I get the design matrix R used?
You can do ANOVA several different ways in R, and that is just the few functions to do this that I am aware of. Showing us what function/code you used would be really helpful and is requested by the posting guide. If you fitted the model using lm, then use the model.matrix method: dat <- data.frame(Y = rnorm(100), X = gl(4,25)) mod <- lm(Y ~ X, data = dat) mod summary(mod) model.matrix(mod) This also works if you used aov() If you used something else, then you'll have to say what... HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.