<?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 Why PROC EXPAND is not that well-known? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724690#M225003</link>
    <description>&lt;P&gt;Hi all SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After playing around for a while, only today, after reading suggestion from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;, I just had a look on &lt;A href="https://support.sas.com/resources/papers/proceedings10/093-2010.pdf" target="_self"&gt;PROC EXPAND&lt;/A&gt;, which is very efficient and simple to generate the lead and lag variables rather than create the lag or lead variables manually and set condition missing for the first or last observation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am so surprising why I did not see much people using it (even in some published code in finance. When trying to find the answer, I think: people may prefer the traditional code&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lagx=ifn(first.id,.,lag(x)); /*ifc for character value*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;because &lt;STRONG&gt;this code can be put in one datastep and make the code shorter (one can deal with many things other than creating a lag variable in one datastep)&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it a reasonable thought?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warmest regards.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 23:10:01 GMT</pubDate>
    <dc:creator>Phil_NZ</dc:creator>
    <dc:date>2021-03-08T23:10:01Z</dc:date>
    <item>
      <title>Why PROC EXPAND is not that well-known?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724690#M225003</link>
      <description>&lt;P&gt;Hi all SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After playing around for a while, only today, after reading suggestion from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;, I just had a look on &lt;A href="https://support.sas.com/resources/papers/proceedings10/093-2010.pdf" target="_self"&gt;PROC EXPAND&lt;/A&gt;, which is very efficient and simple to generate the lead and lag variables rather than create the lag or lead variables manually and set condition missing for the first or last observation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am so surprising why I did not see much people using it (even in some published code in finance. When trying to find the answer, I think: people may prefer the traditional code&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lagx=ifn(first.id,.,lag(x)); /*ifc for character value*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;because &lt;STRONG&gt;this code can be put in one datastep and make the code shorter (one can deal with many things other than creating a lag variable in one datastep)&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it a reasonable thought?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warmest regards.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 23:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724690#M225003</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-08T23:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why PROC EXPAND is not that well-known?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724694#M225006</link>
      <description>SAS/ETS is an expensive license that isn't that popular. Once you get outside of Base stuff that's a lot more common.</description>
      <pubDate>Mon, 08 Mar 2021 23:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724694#M225006</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-03-08T23:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why PROC EXPAND is not that well-known?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724712#M225013</link>
      <description>&lt;P&gt;You may want to peruse the entire SAS product catalog. Depending on what your organization does there can be a number of products that make things much nicer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once upon a time, in the days of SAS 6.12 I worked with a large government organization that had a license for almost all of the SAS products at the time. Installation disks ran to about 2-and-a-half stack feet. Found some of the ETS procedures very handy for dealing with part of our time series data, IML for a small number of simulation projects, AF and FSP for interface design to data extraction and custom output file creation and writing programs to keep up with the instrument changes at over 60 collection sites, used Proc Loan (ETS) to help analyze options for buying my house, SAS/QC to help with determining if we were having quality issues with collection instrument data, and other stuff.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have many of these modules it can be surprising just how much of the core of many tasks are available but you need to become familiar enough with the documentation to know where to look and recognize what you need.&lt;/P&gt;
&lt;P&gt;Yes, there is a significant $$$ factor. The man hours trying to recreate some of the processes in the various modules with Base SAS and/or macro programming can add up fast and translates into even more money in some cases.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 00:13:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724712#M225013</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-09T00:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why PROC EXPAND is not that well-known?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724721#M225019</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;EM&gt;&amp;gt; The man hours trying to recreate some of the processes in the various modules with Base SAS and/or macro programming can add up fast and translates into even more money in some cases.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;This does not show on the balance sheet, so bean counters can "save" money' by not licencing products, and then congratulate themselves about all the savings they made.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 00:32:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724721#M225019</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-09T00:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why PROC EXPAND is not that well-known?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724728#M225024</link>
      <description>&lt;P&gt;I agree that PROC EXPAND can often be more straightforward in generating univariate (even multiple univariate) time series - and it can make it easier to generate leads.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But there are some characteristics of PROC EXPAND that can make it weaker than the data step alternative:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;It's univariate - i.e. you can't get a running series of cross products.&amp;nbsp; That's a disadvantage when you want to run rolling window regressions.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;It only creates data set FILES, not VIEWS.&amp;nbsp; So, with large datasets, it can be a costly consumer of disk input/output resources.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;It can't produce multiple windows sizes in one pass.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 09 Mar 2021 01:06:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-PROC-EXPAND-is-not-that-well-known/m-p/724728#M225024</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-03-09T01:06:21Z</dc:date>
    </item>
  </channel>
</rss>

