<?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: Dummy Variable for Month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dummy-Variable-for-Month/m-p/703999#M215772</link>
    <description>&lt;P&gt;Creating dummy variables for this purpose is not necessary. You can simply use variable MOI in PROC FREQ. I point out that using a month number by itself gets somewhat sketchy if the months are from different years, as January of year 1 and January of year 2 would be considered to be the same month (is that what you want?)&lt;BR /&gt;&lt;BR /&gt;But I am confused by your PROC FREQ. Do you really want the 9-way table of frquencies? That doesn't sound like the words you used to describe the output.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Dec 2020 01:35:40 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-12-07T01:35:40Z</dc:date>
    <item>
      <title>Dummy Variable for Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-Variable-for-Month/m-p/703998#M215771</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some difficulty creating dummy variables for the months and also creating a table where i can see how many people were infected during a specific month. Below are the codes that i have so far&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Dummy Variables*/&lt;BR /&gt;&lt;BR /&gt;DATA work.import;&lt;BR /&gt;SET work.import;&lt;BR /&gt;IF MOI=4 THEN DUMMYMONTH2=1;&lt;BR /&gt;IF MOI=5 THEN DUMMYMONTH3=1; ELSE DUMMYMONTH3=0;&lt;BR /&gt;IF MOI=6 THEN DUMMYMONTH4=1; ELSE DUMMYMONTH4=0;&lt;BR /&gt;IF MOI=7 THEN DUMMYMONTH5=1; ELSE DUMMYMONTH5=0;&lt;BR /&gt;IF MOI=8 THEN DUMMYMONTH6=1; ELSE DUMMYMONTH6=0;&lt;BR /&gt;IF MOI=9 THEN DUMMYMONTH7=1; ELSE DUMMYMONTH7=0;&lt;BR /&gt;IF MOI=10 THEN DUMMYMONTH8=1; ELSE DUMMYMONTH8=0;&lt;BR /&gt;IF MOI=11 THEN DUMMYMONTH9=1; ELSE DUMMYMONTH9=0;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;PROC FREQ DATA=work.import;&lt;BR /&gt;TABLES DUMMYMONTH1*DUMMYMONTH2*DUMMYMONTH3*DUMMYMONTH4*DUMMYMONTH5*DUMMYMONTH6*DUMMYMONTH7*DUMMYMONTH8*DUMMYMONTH9/LIST;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&amp;nbsp;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Dec 2020 23:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-Variable-for-Month/m-p/703998#M215771</guid>
      <dc:creator>Daisy808</dc:creator>
      <dc:date>2020-12-06T23:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy Variable for Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-Variable-for-Month/m-p/703999#M215772</link>
      <description>&lt;P&gt;Creating dummy variables for this purpose is not necessary. You can simply use variable MOI in PROC FREQ. I point out that using a month number by itself gets somewhat sketchy if the months are from different years, as January of year 1 and January of year 2 would be considered to be the same month (is that what you want?)&lt;BR /&gt;&lt;BR /&gt;But I am confused by your PROC FREQ. Do you really want the 9-way table of frquencies? That doesn't sound like the words you used to describe the output.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 01:35:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-Variable-for-Month/m-p/703999#M215772</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-12-07T01:35:40Z</dc:date>
    </item>
  </channel>
</rss>

