Skip to content
Prev 156123 / 398506 Next

Loop for running several models and retrieving outputs

It is hard to tell since you have not told us what 'xxxxxxxxxxxxx' is,
but one way is to create a list of the objects you want to send to
'lm' and then save them in a list as output:

fit.mod <- list()
for (i in seq_along(myModels)){
    fit.mod[[i]] <- lm(myModels[[i]]
}
On Mon, Sep 15, 2008 at 4:49 PM, FD <fhduan at gmail.com> wrote: