Hi Lukas, You may find my meifly package helpful. It provides functions to generate ensembles of models (eg. fitall) and then extract all the coefficients, residuals etc (coef, summary, residual etc). The main point of the package is to visualise all these models, and I second Frank's comment that merely selecting the best model will be perilous.
Unfortunately, the package is not on CRAN yet, but if you are interested, contact me off list with your OS and I can email you the package, and accompanying paper. Regards, Hadley On 2/27/07, Indermaur Lukas <[EMAIL PROTECTED]> wrote: > Hi, > Fitting all possible models (GLM) with 10 predictors will result in loads of > (2^10 - 1) models. I want to do that in order to get the importance of > variables (having an unbalanced variable design) by summing the up the > AIC-weights of models including the same variable, for every variable > separately. It's time consuming and annoying to define all possible models by > hand. > > Is there a command, or easy solution to let R define the set of all possible > models itself? I defined models in the following way to process them with a > batch job: > > # e.g. model 1 > preference<- formula(Y~Lwd + N + Sex + YY) > # e.g. model 2 > preference_heterogeneity<- formula(Y~Ri + Lwd + N + Sex + YY) > etc. > etc. > > > I appreciate any hint > Cheers > Lukas > > > > > > °°° > Lukas Indermaur, PhD student > eawag / Swiss Federal Institute of Aquatic Science and Technology > ECO - Department of Aquatic Ecology > Überlandstrasse 133 > CH-8600 Dübendorf > Switzerland > > Phone: +41 (0) 71 220 38 25 > Fax : +41 (0) 44 823 53 15 > Email: [EMAIL PROTECTED] > www.lukasindermaur.ch > > ______________________________________________ > [email protected] 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. > ______________________________________________ [email protected] 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.
