<?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: Create dummy rows based on time variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368178#M87776</link>
    <description>&lt;P&gt;First question: Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, in your wan dataset, when TIME = 1, you have an increment of 0.5 and not 0.25 from time = 1 to time = 3?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2017 07:31:59 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2017-06-19T07:31:59Z</dc:date>
    <item>
      <title>Create dummy rows based on time variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368177#M87775</link>
      <description>&lt;P&gt;DATA HAVE;&lt;BR /&gt;INPUT ID TIME D1 D2 E1;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 -0.25 . . 0&lt;BR /&gt;1 0 . . 1&lt;BR /&gt;1 3 . . 0&lt;BR /&gt;1 672.25 . . 0&lt;BR /&gt;2 0 . . 0&lt;BR /&gt;2 0 . . 1&lt;BR /&gt;2 3 21300 9.966 0&lt;BR /&gt;2 669.5 2760 7.923 0&lt;BR /&gt;2 670.0833 . . 1&lt;BR /&gt;2 673.25 31400 10.355 0&lt;BR /&gt;2 1509.1667 3760 8.232 0&lt;BR /&gt;2 1509.1667 . . 1&lt;BR /&gt;2 1512.1667 24100 10.09 0&lt;BR /&gt;2 2181.4167 4170 8.336 0&lt;BR /&gt;2 2181.5 . . 1&lt;BR /&gt;2 2184.5333 26900 10.2 0&lt;BR /&gt;2 2853.5 . . 1&lt;BR /&gt;2 3525.7917 . . 1&lt;BR /&gt;2 3981.5 9310 9.139 0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;DATA WANT;&lt;BR /&gt;INPUT ID TIME D1 D2 E;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 -0.25 . . 0&lt;BR /&gt;1 0 . . 1&lt;BR /&gt;1 0.2 . . 0&lt;BR /&gt;1 0.4 . . 0&lt;BR /&gt;1 0.6 . . 0&lt;BR /&gt;1 0.8 . . 0&lt;BR /&gt;1 1 . . 0&lt;BR /&gt;1 1.5 . . 0&lt;BR /&gt;1 2 . . 0&lt;BR /&gt;1 2.5 . . 0&lt;BR /&gt;1 3 . . 0&lt;BR /&gt;1 672.25 . . 0&lt;BR /&gt;2 0 . . 0&lt;BR /&gt;2 0 . . 1&lt;BR /&gt;1 0 . . 1&lt;BR /&gt;1 0.2 . . 0&lt;BR /&gt;1 0.4 . . 0&lt;BR /&gt;1 0.6 . . 0&lt;BR /&gt;1 0.8 . . 0&lt;BR /&gt;1 1 . . 0&lt;BR /&gt;1 1.5 . . 0&lt;BR /&gt;1 2 . . 0&lt;BR /&gt;1 2.5 . . 0&lt;BR /&gt;2 3 21300 9.966 0&lt;BR /&gt;2 669.5 2760 7.923 0&lt;BR /&gt;2 670.0833 . . 1&lt;BR /&gt;2 673.25 31400 10.355 0&lt;BR /&gt;2 1509.1667 3760 8.232 0&lt;BR /&gt;2 1509.1667 . . 1&lt;BR /&gt;2 1512.1667 24100 10.09 0&lt;BR /&gt;2 2181.4167 4170 8.336 0&lt;BR /&gt;2 2181.5 . . 1&lt;BR /&gt;2 2184.5333 26900 10.2 0&lt;BR /&gt;2 2853.5 . . 1&lt;BR /&gt;2 3525.7917 . . 1&lt;BR /&gt;2 3981.5 9310 9.139 0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create the dummy rows using the time variable. for instance, from time=0 to time=1, dummy rows will be created with an increment of time value by 0.2. Also, &amp;nbsp;from time=1 to time=3, dummy rows will be created with an increment of 0.5. for each dummy record created D1and &amp;nbsp;D2 will be set . and E1 will be set to 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help to create this output data is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 07:45:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368177#M87775</guid>
      <dc:creator>Nsas</dc:creator>
      <dc:date>2017-06-19T07:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create dummy rows based on time variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368178#M87776</link>
      <description>&lt;P&gt;First question: Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, in your wan dataset, when TIME = 1, you have an increment of 0.5 and not 0.25 from time = 1 to time = 3?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 07:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368178#M87776</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-06-19T07:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create dummy rows based on time variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368181#M87777</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;: this is to perform some sort of simulation. Thanks for catch with increment values. Increment is &amp;nbsp;0.5 from &amp;nbsp;time=1 to time=3.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 07:43:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dummy-rows-based-on-time-variable/m-p/368181#M87777</guid>
      <dc:creator>Nsas</dc:creator>
      <dc:date>2017-06-19T07:43:25Z</dc:date>
    </item>
  </channel>
</rss>

