I have built a simple regression model using the iris data set. I would like to run the dependent variable (iris$Sepal.Length
) with all available variables, each regression with its own variable (each regression should be with . The outcome that I wanted to get is a list of each regression summary. Using the iris data set there should be 4 regressions:
r1 <- lm(Sepal.Length ~ Sepal.Width, data=iris)
r2 <- lm(Sepal.Length ~ Petal.Length, data=iris)
r3 <- lm(Sepal.Length ~ Petal.Width, data=iris)
r4 <- lm(Sepal.Length ~ Species, data=iris)
and a summary with the coefficients for each one of the regressions. Any Ideas how can I do this?