Dear all, I was working with a GLM model and wondering whether is it possible to have a model description with all possible main effects as well as all interactions. Currently I do it manually however this will become cumbersome if I have large number of variables.
Means suppose I have 3 explanatory variables and want to feed automatically with all possible combinations like: glm(Response~1) glm(Response~X) glm(Response~Y) glm(Response~Z) glm(Response~X+Y) glm(Response~X+Z) glm(Response~Z+Y) glm(Response~X+Y+X*Y) glm(Response~X+Z+X*Y) .................................................... all combinations which are possible Thanks and regards, ______________________________________________ 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.