[R] All possible linear models given multiple explaining variables

Ben Bolker bolker at ufl.edu
Wed Jul 22 15:44:31 CEST 2009




hadley wrote:
> 
> Have a look at the meifly package, which also includes tools for
> visualising the resulting models.
> Hadley
> 
> On Wed, Jul 22, 2009 at 7:28 AM, Thomas A. Groen<tagroen at gmail.com> wrote:
>> Hi,
>>
>> I would like to have a script/function (or write one) that can calculate
>> the
>> linear models for all possible combinations of explaining variables.
>> Eventually I would like to end up with a data base (or data frame) giving
>> for each model the R2, R2adj, AIC etc.
>> Currently I'm a bit stuck while writing my own script using the lm()
>> function from the base package. Also, I haven't fund any function (yet)
>> that
>> can do this as well. Perhaps these functions/scripts already exist? I
>> would
>> be very grateful to any suggestions and thoughts.
>>
>> kind regards,
>> Thomas
>>
> 
> 

Also try the MuMIn package from r-forge , and possibly the leaps package.

-- 
View this message in context: http://www.nabble.com/All-possible-linear-models-given-multiple-explaining-variables-tp24605474p24606776.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list