title: R loop for multiple VARs
body: <p>I have an R loop:</p>
  
  <pre><code>for(i in 1:10){
    VAR(reg_full,p = i, type = "both")
  }
  </code></pre>
  
  <p>but when I run it I get no output (no error either). The console is simply waiting for my next output. </p>
  
  <p>My goal is to run 10 different VAR models with lags 1 through 10, and then plot their IRFs using the <code>IRF</code> function of <code>vars</code> package. I am stuck on step one (calculate the VARs). </p>
  
  <p><code>p=i</code> is the lag selection that I would like in the model, ideally <code>i</code> takes the values 1:10. <code>reg_full</code> is my dataframe, <code>type = "both"</code> is just an option (not important). </p>
  
  <p>Also, how do I assign a model name, such as <code>model1</code> to the model so that I store the results. The results are stored in a list object?</p>
  
  <p>Thank you all for your efforts.</p>