Suppose I have a large data set with variables $x_1, x_2, \ldots, x_p$ to predict response $y$ where $p$ is very large (however $n >> p$).
I would like to perform forward stepwise regression on the data using an appropriate function in R, such as stepAIC
from the MASS
package.
Does the order in which the data appears in the data frame matter or will we get the same model each time the algorithm is run. By this I mean that I run forward stepwise regression and I get a result. Suppose I shuffle the order of the columns in the data frame and rerun the forward stepwise selection. Will I get a different result with the shuffled data frame?
I have experimented with small data sets and I get the same result when I shuffle the order of the variables, however I am unsure whether this will occur with very large data sets which can take several hours to run on HPC.