<?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 can I add a lag  as a regressor? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-add-a-lag-as-a-regressor/m-p/207596#M2824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question is how to add a lag as an input variable? I don't think any of the Modify nodes have a simple way to do it. But it is really easy to do in SAS Code.&lt;/P&gt;&lt;P&gt;In Enterprise Guide add the below when preparing your data, or use a SAS Code Node in Enterprise Miner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG (add this statement in any data step, and change var1 for the name of your input variable)&lt;/P&gt;&lt;P&gt;&amp;nbsp; lag_var1= lag(var1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EM, in a SAS Code Node (change var1 for the name of your variable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;em_export_train;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set &amp;amp;em_import_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp; lag_var1= lag(var1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps,&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2015 13:41:49 GMT</pubDate>
    <dc:creator>M_Maldonado</dc:creator>
    <dc:date>2015-03-24T13:41:49Z</dc:date>
    <item>
      <title>How can I add a lag  as a regressor?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-add-a-lag-as-a-regressor/m-p/207595#M2823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with SAS Enterprise Miner and SAS E. Guide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 04:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-add-a-lag-as-a-regressor/m-p/207595#M2823</guid>
      <dc:creator>JPI_UY</dc:creator>
      <dc:date>2015-03-23T04:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add a lag  as a regressor?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-add-a-lag-as-a-regressor/m-p/207596#M2824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question is how to add a lag as an input variable? I don't think any of the Modify nodes have a simple way to do it. But it is really easy to do in SAS Code.&lt;/P&gt;&lt;P&gt;In Enterprise Guide add the below when preparing your data, or use a SAS Code Node in Enterprise Miner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG (add this statement in any data step, and change var1 for the name of your input variable)&lt;/P&gt;&lt;P&gt;&amp;nbsp; lag_var1= lag(var1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EM, in a SAS Code Node (change var1 for the name of your variable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data &amp;amp;em_export_train;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set &amp;amp;em_import_data;&lt;/P&gt;&lt;P&gt;&amp;nbsp; lag_var1= lag(var1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps,&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 13:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-can-I-add-a-lag-as-a-regressor/m-p/207596#M2824</guid>
      <dc:creator>M_Maldonado</dc:creator>
      <dc:date>2015-03-24T13:41:49Z</dc:date>
    </item>
  </channel>
</rss>

