# Data frame of results

#### leonedelman

##### New Member
Hi all

Suppose I have 10 different models as such:

Code:
fit1.glm <- glm(admit ~ gre , data = dat, family = "binomial")
fit2.glm <- glm(admit ~ gpa, data = dat, family = "binomial")
fit3.glm <- glm(admit ~ rank, data = dat, family = "binomial")
...
Suppose then, I want to form a data frame as such:

variable Odds ratio lower CI upper CI
gre
gpa
rank
...
How could this be done? Ciao!!

#### Dason

##### Ambassador to the humans
It would probably be cleaner if you you originally did something like
Code:
fit <- list()
fit[[1]] <- glm(admit ~ gre , data = dat, family = "binomial")
fit[[2]] <- glm(admit ~ gpa, data = dat, family = "binomial")
fit[[3]] <- glm(admit ~ rank, data = dat, family = "binomial")
...
And even that could be cleaned up. But if you store directly into a list you can use functions like lapply to easily apply the same function to each element which saves a lot of typing later on.