I have a dataframe with 5 covariates `X1, X2, X3, X4, X5`

and a dependent variable `Y`

. I have to perform a univariate regression of `Y`

on each covariate. I don’t want to do

```
using GLM
lm(@formula(Y~X1), data)
lm(@formula(Y~X2), data)
lm(@formula(Y~X3), data)
lm(@formula(Y~X4), data)
lm(@formula(Y~X5), data)
```

because it’s counterproductive, specially if I have a large number of covariates. I’m trying to build a loop, but I don’t know how to call each covariate from the dataframe with `@formula`

. I tried

```
for i=1:5
lm(@formula(Y~data[:,i]), data)
end
```

but it does not work. Any hint?