I want to run linear regression for the same outcome and a number of covariates minus one covariate in each model. I have looked at the example on this page but could that d
Following this example you could do this:
lapply(1:3, function(i){ lm(as.formula(sprintf("y ~ x%i + x4 + x5", i)), a) })