Try this:
apply(subset.models[,-1], 1,
function(x)lm(as.formula(paste('y ~', paste(names(freeny[,-1])[x],
collapse = "+"), sep = "")), data = freeny))
On Sun, Sep 13, 2009 at 10:57 AM, Axel Urbiz wrote:
> Hi,
>
> Id like to fit one GLM model for each possible combination of inputs (i.
Hi,
Id like to fit one GLM model for each possible combination of inputs (i.e.
exhaustive search). The package leaps can help me to generate all possible
variable subsets, but Ill appreciate your guidance as of how to generate
one model for each of those possible subsets. Im new in R! Thanks i
2 matches
Mail list logo