<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create two-way interaction terms of multiple variables and store them into a data table? in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373983#M3575</link>
    <description>Thanks very much WarrenKuhfeld, but I could't see your code clearly. Could you please make up a matrix (say a={1 2 3 5}) and retype the code?</description>
    <pubDate>Fri, 07 Jul 2017 14:29:27 GMT</pubDate>
    <dc:creator>ty004720</dc:creator>
    <dc:date>2017-07-07T14:29:27Z</dc:date>
    <item>
      <title>How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373272#M3562</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am studying the two-way interaction effects of multiple variables. If&amp;nbsp;there are 17 interested variables (say x1,x2,&lt;SPAN&gt;…,&lt;/SPAN&gt;x17), there will be 17*16/2=136 two-way interaction terms. How can I create all those 136&amp;nbsp;two-way interaction terms and store them into a data table?&lt;/P&gt;&lt;P&gt;Thanks! Any ideas will be much appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373272#M3562</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-05T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373283#M3563</link>
      <description>&lt;PRE&gt;%mktex(2 ** 17, n=32) /* make a design */

* code it;
proc transreg data=design design;
   model class(%macro int; x1 %do i = 2 %to 17; | x&amp;amp;i %end; @2 %mend; %int);
   output out=coded;
   run;
   
proc print; run;
               
      
               &lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 14:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373283#M3563</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-07-05T14:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373291#M3564</link>
      <description>&lt;P&gt;You can use any of several SAS procedures to write a design matrix.&lt;STRONG&gt; For a summary and example, see &lt;A href="http://blogs.sas.com/content/iml/2016/02/24/create-a-design-matrix-in-sas.html" target="_self"&gt;"Four ways to create a design matrix in SAS."&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you posted this in the SAS/IML forum, you can also use the HDIR function to create interaction effects between columns of two design matrices. See &lt;A href="http://blogs.sas.com/content/iml/2016/03/02/dummy-variables-sasiml.html" target="_self"&gt;"Dummy variables in SAS/IML."&lt;/A&gt;&amp;nbsp; But you know this already since &lt;A href="https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/how-to-use-horizontal-direct-product-HDIR-when-the-matrices-have/m-p/373256#M3561" target="_self"&gt;you previously asked about the HDIR function.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 15:39:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373291#M3564</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-07-06T15:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373296#M3565</link>
      <description>&lt;P&gt;Hi Rick, thanks for your help.&amp;nbsp;I figured out how to use HDIR when matrices have missing value.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;However, a new issue comes out. Since we have 17 interested variables, we will get 17*17=289 terms when we use HDIR, but what we want is just 17*16/2=136 two-way interaction terms. The result by using HDIR has repeated interaction terms besides quadratic terms. Say if we have 3 variables a,b,and c, HDIR will give us aa,&lt;FONT color="#ff0000"&gt;ab&lt;/FONT&gt;,&lt;FONT color="#0000ff"&gt;ac&lt;/FONT&gt;,&lt;FONT color="#ff0000"&gt;ba&lt;/FONT&gt;,bb&lt;FONT color="#ff00ff"&gt;,bc&lt;/FONT&gt;,&lt;FONT color="#0000ff"&gt;ca&lt;/FONT&gt;,&lt;FONT color="#ff00ff"&gt;cb&lt;/FONT&gt;,and cc.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Do you have any suggestions on this?&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Jul 2017 14:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373296#M3565</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-05T14:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373362#M3566</link>
      <description>&lt;P&gt;I see. So you are building the interaction of a variable with itself. &amp;nbsp;Again I emphasize that it will be easier to use one of the dedicated SAS procedures for this. You can &lt;A href="http://blogs.sas.com/content/iml/2011/10/24/video-calling-sas-procedures-from-the-sasiml-language.html" target="_self"&gt;use the SUBMIT statement to call a SAS&amp;nbsp;procedure from within a SAS/IML&amp;nbsp;program&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, if c=HDIR(a,a), the&amp;nbsp;columns you want to keep are exactly the indices (in row-major order) of the strictly upper-triangular elements of a p x p matrix, where p=ncol(a). &amp;nbsp;In the following statements, I use some SAS/IML functions that might be new to you:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/06/09/generate-a-grid-of-points.html" target="_self"&gt;The EXPANDGRID function&lt;/A&gt; returns the Cartesian product of two vectors&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.sas.com/content/iml/2012/02/29/defining-banded-and-triangular-matrices.html" target="_self"&gt;The ROW and COL functions&lt;/A&gt; can be used to find the indices of the upper-triangular elements&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The program just figures out which columns correspond to the desired interactions. &amp;nbsp;I've also generated example names, which is not necessary but seems useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
a = {1 2  3 5};
c = hdir(a,a);     /* all two-way interactions */

names = "a":"d";
p = ncol(a);

interactNames = expandgrid(names, names);  /* names of all two-way interactions */
fullNames = interactNames[,1] + "*" + interactNames[,2]; 
print c[colname=fullNames];

M = shape(1:p##2, p);
keepIdx = loc( row(M) &amp;lt; col(M) );

partInteract = c[ ,keepIdx];
partNames = interactNames[keepIdx,1] + "*" + interactNames[keepIdx,2]; 
print partInteract[colname=partNames];


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 17:12:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373362#M3566</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-07-05T17:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373637#M3567</link>
      <description>&lt;P&gt;Why not pick up the right columns ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
a = {1 2  3 5};
c = hdir(a,a);

n=ncol(a);
bad_idx=do(1,n#n,n+1);
good_idx=setdif(1:n#n,bad_idx);

want=c[,good_idx];

print c,want;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jul 2017 13:05:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373637#M3567</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-06T13:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373649#M3568</link>
      <description>&lt;P&gt;Lots of good solutions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it doesn't have to be an IML solution, PROC GLMMOD does the job as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 13:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373649#M3568</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-07-06T13:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373691#M3569</link>
      <description>&lt;P&gt;Sorry to disagree, but personally, I think GLMMOD does not provide a &lt;EM&gt;good&lt;/EM&gt; solution, although it can certainly work. &amp;nbsp;You will understand my biases as you read further. GLMMOD was simply designed to provide some mechanism to output to a data set the same coding that GLM uses. &amp;nbsp;There is no built-in correspondence between the columns in the matrix and the rows when there are BY variables, and there is nothing descriptive in the column names. &amp;nbsp;The test below illustrates. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Transreg was designed to enable various types of coding and provide sensible names and labels along with several options that provide user control over the names and labels. &amp;nbsp;Unlike GLMMOD, a variable&amp;nbsp;always means the same thing throughout the data set.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Much later, when various forms of coding were added to other modeling procedures, they followed the lead of transreg (although not the syntax of transreg), but went beyond what transreg did in many ways. &amp;nbsp;Different variable naming and labeling "cults" were provided as options (although they were never referred to that way outside of SAS).&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When I learned linear models in graduate school in the early 1980s at UNC from Ron Helms, there was no automatic way in SAS to get alternative&amp;nbsp;codings (reference cell, LTFR, cell mean, effects, splines, separate slopes and intercepts, separate slopes same intercept, multiple parallel lines, etc.) into a data set. &amp;nbsp;I made providing those codings a priority when I wrote transreg starting in the mid 1980s. I also made transreg handle some esoteric codings common in discrete choice modeling. &amp;nbsp;As I said, now other procs go way beyond what I did in transreg, but GLMMOD is not one of them. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the history lesson, but I figure someone out there might find this SAS modeling history interesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%mktex(3 ** 6, n=18, out=d1)
%mktex(2 ** 6, n=12, out=d2)
data x;
set d1 d2(in=i);
by = i;
y = _n_;
run;
proc print; run;
proc glmmod data=x outdesign=g1(drop=y) noprint;
class x1-x6;
model y = x1-x6;
run;
proc glmmod data=x outdesign=g2(drop=by y) noprint;
class x1-x6;
model y = x1-x6;
by by;
run;
proc compare error note briefsummary criterion=1e-10
data=g1 compare=g2 method=relative(1);
run;
proc print data=g1; run;
proc print data=g2; run;
proc contents varnum; ods select position; run;
proc transreg data=x design replace;
model class(x1-x6);
output out=t1(drop=_:);
run;
proc transreg data=x design replace;
model class(x1-x6);
output out=t2(drop=_: by);
by by;
run;
proc compare error note briefsummary criterion=1e-10
data=t1 compare=t2 method=relative(1);
run;
proc print data=t1; run;
proc print data=t2; run;
proc contents varnum; ods select position; run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 15:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373691#M3569</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-07-06T15:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373807#M3570</link>
      <description>&lt;P&gt;Thanks very much for your reply, Ksharp. The result we want should have 6 elements {1,2,3,5,6,10,15}, but yours returns more than that. I think the problem&amp;nbsp;is that when you define bad_idx, you only include the indexes of the diagonal elements.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please revise your code?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 23:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373807#M3570</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-06T23:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373810#M3571</link>
      <description>Thanks for your reply. Any more specific suggestions?</description>
      <pubDate>Fri, 07 Jul 2017 00:00:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373810#M3571</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-07T00:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373930#M3573</link>
      <description>&lt;P&gt;OK. Same as Rick's code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
a = {1 2  3 5};
c = hdir(a,a);

n=ncol(a);
idx=shape(do(1,n#n,1),n);
want_idx=loc( row(idx) &amp;lt; col(idx) );

want = c[ ,want_idx];

print c,want;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jul 2017 12:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373930#M3573</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-07-07T12:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373975#M3574</link>
      <description>Great! This works!</description>
      <pubDate>Fri, 07 Jul 2017 13:59:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373975#M3574</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-07T13:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373983#M3575</link>
      <description>Thanks very much WarrenKuhfeld, but I could't see your code clearly. Could you please make up a matrix (say a={1 2 3 5}) and retype the code?</description>
      <pubDate>Fri, 07 Jul 2017 14:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/373983#M3575</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-07T14:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374007#M3576</link>
      <description>&lt;P&gt;This is probably a little more efficient and gets to&amp;nbsp;the index in one line!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  n = ncol(a);
  want_idx = cusum(vech( j(n-1,n-1) + diag(1:(n-1)) ));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jul 2017 16:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374007#M3576</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2017-07-07T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374063#M3577</link>
      <description>Thanks! I like it!</description>
      <pubDate>Fri, 07 Jul 2017 18:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374063#M3577</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-07T18:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374242#M3580</link>
      <description>&lt;P&gt;I developed my idea above into a small helper function that others might find useful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
  /* The TRI_IDX function returns the index numbers of the triangular elements in a
     square matrix of side n.

       The parameter UPPER is a Boolean that gives the upper triangle when true,
       the lower triangle when false. 

       The parameter MAINDIAG is a Boolean that indicates whether or not the
       elements from the main diagonal should be included.
  */
  start tri_idx(n, upper, maindiag);
	idx = cusum( vech( diag((1-maindiag):(n-1)) + 1));
	if upper then return(idx); else return((n#n+1) - idx[nrow(idx):1] );
  finish;

  /* demonstrate function for a 4x4 matrix */
  print (shape(1:16,4)) [format=2.0];
  print (tri_idx(4,0,0)) [l='lower triangle no diagonal'];
  print (tri_idx(4,0,1)) [l='lower triangle including diagonal'];
  print (tri_idx(4,1,0)) [l='upper triangle no diagonal'];
  print (tri_idx(4,1,1)) [l='upper triangle including diagonal'];
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 09 Jul 2017 09:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374242#M3580</guid>
      <dc:creator>IanWakeling</dc:creator>
      <dc:date>2017-07-09T09:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374246#M3581</link>
      <description>&lt;P&gt;For additional thoughts on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/9374"&gt;@IanWakeling&lt;/a&gt;'s function, see &lt;A href="http://blogs.sas.com/content/iml/2012/08/16/extract-the-lower-triangular-elements-of-a-matrix.html" target="_self"&gt;"Extract the lower triangular elements of a matrix"&lt;/A&gt;, which uses the built-in VECH function when the diagonal elements are included.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jul 2017 11:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374246#M3581</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-07-09T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374253#M3582</link>
      <description>I like it! Thanks!</description>
      <pubDate>Sun, 09 Jul 2017 13:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374253#M3582</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-09T13:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374254#M3583</link>
      <description>Sure. Thanks!</description>
      <pubDate>Sun, 09 Jul 2017 13:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374254#M3583</guid>
      <dc:creator>ty004720</dc:creator>
      <dc:date>2017-07-09T13:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create two-way interaction terms of multiple variables and store them into a data table?</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374475#M3585</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;WarrenKuhfeld wrote:
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the history lesson, but I figure someone out there might find this SAS modeling history interesting.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is very useful information, and I have bookmarked this thread. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 12:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-to-create-two-way-interaction-terms-of-multiple-variables/m-p/374475#M3585</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-07-10T12:56:02Z</dc:date>
    </item>
  </channel>
</rss>

