I have a vector and run the following autocorrelation function where I obtain the significant lags and create a dataframe adjusted to the minimun length of the lags. The example produces random numbers and thus it maybe necessary to repeat the code so enough lagged variables occur. I have a vector and run the following autocorre