On 1/23/2009 12:44 PM, ppeetteerr wrote: > I have a lm in R in the form > model <- lm( Z ~ A*B*C*D,data=mydata) > I want to run the model and include all interactions expect the 4 way > (A:B:C:D) is there an easy way of doing this? I then want to step down the > model eliminating the non-significant terms I understand step() does this > but how would I do it by hand?
For the first part, try this: lm(Z ~ (A + B + C + D)^3, data = mydata) -- Chuck Cleland, Ph.D. NDRI, Inc. (www.ndri.org) 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894 ______________________________________________ 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.