<?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 reverse of lag function? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35595#M8796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possibility is the look ahead, look back method as described at: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt; It is based on the look ahead look back method that is described at:&lt;/SPAN&gt;&lt;A class="jive-link-external-small active_link" href="http://www.sascommunity.org/wiki/Look-Ahead_and_Look-Back" style="background-color: #ffffff; font-size: 12px; color: #0e66ba; font-family: Arial, Helvetica, sans-serif;"&gt;http://www.sascommunity.org/wiki/Look-Ahead_and_Look-Back&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, you would only need to apply the look ahead part, as you appear to want to apply the next z value to each current record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2012 12:11:53 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-01-23T12:11:53Z</dc:date>
    <item>
      <title>reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35594#M8795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I go from this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a1 b1 c1&amp;nbsp;&amp;nbsp;&amp;nbsp; z1&lt;/P&gt;&lt;P&gt;a2 b2 c2&amp;nbsp;&amp;nbsp;&amp;nbsp; z2&lt;/P&gt;&lt;P&gt;a3 b3 c3&amp;nbsp;&amp;nbsp;&amp;nbsp; z3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a1 b1 c1&amp;nbsp;&amp;nbsp;&amp;nbsp; z2&lt;/P&gt;&lt;P&gt;a2 b2 c2&amp;nbsp;&amp;nbsp;&amp;nbsp; z3&lt;/P&gt;&lt;P&gt;a3 b3 c3&amp;nbsp;&amp;nbsp;&amp;nbsp; z4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without lagging the a, b, and c variables? Is there a way to pull back the z variable? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I'd like to avoid this is because I've got many variables of the a, b, and c type that I don't want to mess with / rename, and only one like the z variable that I'd like to move back to the preceding observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 08:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35594#M8795</guid>
      <dc:creator>jaxonmills</dc:creator>
      <dc:date>2012-01-23T08:27:53Z</dc:date>
    </item>
    <item>
      <title>reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35595#M8796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One possibility is the look ahead, look back method as described at: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-color: #ffffff;"&gt; It is based on the look ahead look back method that is described at:&lt;/SPAN&gt;&lt;A class="jive-link-external-small active_link" href="http://www.sascommunity.org/wiki/Look-Ahead_and_Look-Back" style="background-color: #ffffff; font-size: 12px; color: #0e66ba; font-family: Arial, Helvetica, sans-serif;"&gt;http://www.sascommunity.org/wiki/Look-Ahead_and_Look-Back&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However, you would only need to apply the look ahead part, as you appear to want to apply the next z value to each current record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 12:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35595#M8796</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-23T12:11:53Z</dc:date>
    </item>
    <item>
      <title>reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35596#M8797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data b;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; merge a(keep=a b c) a(keep=z firstobs=2);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 13:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35596#M8797</guid>
      <dc:creator>Alfredo</dc:creator>
      <dc:date>2012-01-23T13:15:54Z</dc:date>
    </item>
    <item>
      <title>reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35597#M8798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alfredo, That is basically the look ahead method.&amp;nbsp; It is easier, though, to simply drop the look ahead variable from the first file, rather than explicitly keep all of the others.&amp;nbsp; And if you are going to use merge rather than 2 set statements, you have to insure you have the correct setting for the mergenoby option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 13:23:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35597#M8798</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-23T13:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35598#M8799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;proc expand data=sashelp.class out=lead;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; convert weight=leadWeight&amp;nbsp; / method=none transformout=(lead 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 13:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35598#M8799</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-23T13:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35599#M8800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But you need ETS for proc expand:-(&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 14:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35599#M8800</guid>
      <dc:creator>LarryWorley</dc:creator>
      <dc:date>2012-01-23T14:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35600#M8801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes they should move it to BASE.&amp;nbsp; Jim? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 15:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35600#M8801</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-23T15:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35601#M8802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And, if he is listening, AF should be moved there as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 15:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35601#M8802</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-23T15:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35602#M8803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help guys. I'll give these a try and get back to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 23:33:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35602#M8803</guid>
      <dc:creator>jaxonmills</dc:creator>
      <dc:date>2012-01-23T23:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: reverse of lag function?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35603#M8804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, got it!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 01:18:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/reverse-of-lag-function/m-p/35603#M8804</guid>
      <dc:creator>jaxonmills</dc:creator>
      <dc:date>2012-01-24T01:18:11Z</dc:date>
    </item>
  </channel>
</rss>

