title: loop through variables to create interaction terms
body: <p>I seek to loop through variables (can be contained in a macro variable or a data set) to create a macro variable with interaction terms that I can use in a regression. Here is an example.</p>
  
  <p>Let’s say the original variables are in a  macro variable.</p>
  
  <pre><code>%let predictors = age sex bmi;
  </code></pre>
  
  <p>I seek to loop through these variables and create a macro variable that I  can use in a regression.</p>
  
  <p>In the first iteration, we have age. I seek to create:</p>
  
  <pre><code>% interactions = age sex bmi sex*age bmi*age
  </code></pre>
  
  <p>Fit a regression.</p>
  
  <p>Then use sex in the next iteration.</p>
  
  <pre><code>% interactions = age sex bmi age*sex bmi*sex;
  </code></pre>
  
  <p>And so on. Thanks!</p>