<?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: Organize Panel Data in IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268558#M2751</link>
    <description>&lt;P&gt;Wow, thanks Rick. You are a wonderful help every time. I appreciate your expertise!&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2016 14:52:12 GMT</pubDate>
    <dc:creator>NCSU_2016</dc:creator>
    <dc:date>2016-05-05T14:52:12Z</dc:date>
    <item>
      <title>Organize Panel Data in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268538#M2749</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am confused about how to arrange my data to run a probit model. I am aware&amp;nbsp;the&amp;nbsp;model needs to be run in another package other than IML (namely QLIM), but I thought it would be easiest to arrange the data using IML.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data on 484 farms over 132 months for four variables. Currently, I have each variable in its own matrix as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Quantity Matrix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp; &amp;nbsp;Month_1 &amp;nbsp; &amp;nbsp;Month_2 .... Month_j&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Farm_1&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp;Q_1_1 &amp;nbsp; &amp;nbsp; &amp;nbsp; Q_1_2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Q_1_j&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Farm_2 &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;Q_2_1 &amp;nbsp; &amp;nbsp; &amp;nbsp; Q_2_2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Q_2_j&lt;/P&gt;&lt;P&gt;. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Farm_i &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;Q_i_1 &amp;nbsp; &amp;nbsp; &amp;nbsp; Q_i_2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Q_i_j &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have matrices of equal dimensions for prices, variable costs, and total costs. Column j represents the j'th month and row i represents the i'th farm in each matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can give me some guidance about how to arrange this data, I would greatly appreciate it. Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 14:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268538#M2749</guid>
      <dc:creator>NCSU_2016</dc:creator>
      <dc:date>2016-05-05T14:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Organize Panel Data in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268554#M2750</link>
      <description>&lt;P&gt;Use the COLVEC function to create a single vector from each matrix.&amp;nbsp; Then save the data to a SAS data set, along with indicator variables for the&amp;nbsp;MONTH and FARM variables.&amp;nbsp; This is called transforming the data from "wide to long" form.&amp;nbsp; You might like to read the article &lt;A href="http://blogs.sas.com/content/iml/2015/02/27/multiple-series-iml.html" target="_self"&gt;"Plotting multiple time series in SAS/IML."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the ROW and COL functions to easily create the indicator variables, as follows:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc iml;
/* 4 months (columns) and 3 farms (rows) */
Q = {1  2  3  4,
     5  6  7  8,
     9 10 11 12};
Qvec = colvec(Q);
Farm = colvec(row(Q));
Month = colvec(col(Q));
print Farm Month QVec;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2016 14:50:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268554#M2750</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-05T14:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Organize Panel Data in IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268558#M2751</link>
      <description>&lt;P&gt;Wow, thanks Rick. You are a wonderful help every time. I appreciate your expertise!&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 14:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Organize-Panel-Data-in-IML/m-p/268558#M2751</guid>
      <dc:creator>NCSU_2016</dc:creator>
      <dc:date>2016-05-05T14:52:12Z</dc:date>
    </item>
  </channel>
</rss>

