Suppose that I have X1,...,X14
potential predictors.
Now for a given Y
i want to make the OLS scheme:
Y~X1+X2
Y~X1+X3
....
Y~X1+X14
....
Y~X14+X13
which is basically all the by two combinations of all the predictors. After all those regressions are created I want to use them in the predict
function (if possible).
My question is: How do i make all those regressions with all by two combinations of the regressors?