<?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 monthly dummy variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/274817#M54891</link>
    <description>&lt;P&gt;following the creation of these monthly variables DOC1-DOC48 and only having month_death and year_death on deaths- how could I run a survival analysis? comparing inmmates vs noninmmates?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2016 21:29:43 GMT</pubDate>
    <dc:creator>malena</dc:creator>
    <dc:date>2016-06-02T21:29:43Z</dc:date>
    <item>
      <title>Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270865#M53864</link>
      <description>&lt;P&gt;I have data on about 30000 records, each record can have up to 15 admission dates (Admission1-Admission15), up to 15 release dates (release1-release15) and up to 15 codes decribing the release type (street1-street15- for whether or not the immate was released to the streets).&amp;nbsp; Dates cover Jan&amp;nbsp;2011-Dec 2014&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; admission1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; admission 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; admission 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; release 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; release2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; release3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; street1 &amp;nbsp;street2&amp;nbsp; street3&lt;/P&gt;
&lt;P&gt;WW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;01/10/2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03/01/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/03/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/01/2013&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/01/2013&amp;nbsp;&amp;nbsp; 02/15/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now I want to create 48 dummy variables: Month1-Month48 covering the 4 months of the data-&amp;nbsp;Jan&amp;nbsp;2011-Dec 2014, where Month1 is January 2011 and dummy variable will be 1 only if the person is in prison and the release was not to the street. If the variable street1-street15 is Y that means if was a "true" release and the dummy variable will be 0 for that month and forward until the next admission.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So using this example record, Month1 and Month2-Month24 are all 1. Month25 is 0, Month26 get admitted again so its in prison that month and this should be 1.... and so forth.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I write a macro to do all of this- create all of these 48 dummy variables depending on admission date, release date and street, all which can have up to 15 items per person,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 03:18:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270865#M53864</guid>
      <dc:creator>malena</dc:creator>
      <dc:date>2016-05-17T03:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270868#M53866</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52007"&gt;@malena&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I write a macro to do all of this- create all of these 48 dummy variables depending on admission date, release date and street, all which can have up to 15 items per person,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why do you want a macro?&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 04:07:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270868#M53866</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-17T04:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270871#M53868</link>
      <description>&lt;P&gt;Here's an incredibly inefficient solution. But it's not a macro and its at a basic programming level.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm going to guess, since you only presented one case, that others will break the logic, so hopefully you'll be able to debug it yourself.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could probably do this in a single data step using ARRAYS more efficiently, but it may be harder to understand...or not &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At any rate, here's one long winded solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*Create fake data;
data have;
informat admission1-admission3 release1-release3 anydtdte.;
format admission1-admission3 release1-release3 date9.;
input ID $         admission1     admission2       admission3     release1       release2      release3         street1 $  street2 $ street3 $;
cards;
WW       01/10/2011      03/01/2013       01/03/2014      01/01/2013    11/01/2013   02/15/2014       Y         N          Y
;
run;

*Flip to long structure;
data have_flipped;
set have;
array admit(3) admission1-admission3;
array release(3) release1-release3;
array street(3) street1-street3;

do i=1 to dim(admit);
date_admission=admit(i);
date_release=release(i);
release_type=street(i);
output;

end;
format date_: date9.;

drop admission1-admission3 release1-release3  street1-street3;
run;

*Create a record for each month based on admission and release date;
data have_monthly;
set have_flipped;
N_interval = intck('month', date_admission, date_release);
do i=1 to N_interval+1;
Month=intnx('month', date_admission, i-1, 'b');
Status=1;

if i=(N_interval+1) and release_type='Y' then status=0;

output;
end;

format month yymon7.;

keep ID month status;
run;

/*This section of code creates the empty data set required for the final data structure
one record per month, per ID
*/

*Create months;
data empty_months;
start = '01Dec2010'd;
do i=1 to 48;
Month=intnx('month', start, i, 'b');
Monthly_Number = catt("Month", put(i, z2.));
output;
end;
format month yymon7.;
keep month Monthly_Number;
run;

*Get list of IDs;
proc sql;
create table ids as
select distinct id from have;
quit;

*Create monthly by ID table with no status;
proc sql;
create table empty_status as
select a.id, b.*
from empty_months as b
cross join ids as a
order by 1, 2;
quit;

*Add in status from previous calculation;
proc sql;
create table status as
select a.*, b.status
from empty_status as a
left join have_monthly as b
on a.id=b.id
and a.month=b.month
order by 1,2;
quit;

*fill down values so values are retained across time;
data status_filled;
length status 8.;
set status;
by id;
retain final_status;
if first.id then final_status=status;
else if not missing(status) then final_status=status;
status=final_status;

drop final_status;
run;

*Transpose back to final wide data structure;
proc transpose data=status_Filled out=want(drop= _name_);
by id;
var status;
id monthly_number;
idlabel month;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 May 2016 04:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270871#M53868</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-17T04:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270903#M53879</link>
      <description>&lt;P&gt;Several things here. &amp;nbsp;Firstly can you post some test data - in the form of a datastep, which covers one complete case, and what the output should look like. &amp;nbsp;Secondly, why do you need loads of per month variables, this sounds like an ineffcient method of doing whatever it is you are doing as there are plenty of functions to check if something is within time windows. &amp;nbsp;Thirdly think about your data, how do you want to work with it, not how is it supposed to look like at the end. &amp;nbsp;The data you program with can look completely different from a report output, this is because programming works differently. &amp;nbsp;For instance why not have a normalised structure:&lt;/P&gt;
&lt;PRE&gt;data have;
  id="WW"; 
  admission=1; 
  adm_date="10jan2011"d;      
  rel_date="01jan2013"d;
  street="Y"; output;
  admission=2;
  adm_date="01mar2013"d;       
  rel_date="01nov2013"d;
  street="N"; output;
  admission=3;
  adm_date="03jan2014"d;             
  rel_date="15feb2014"d; 
  street="Y"; output;
run;&lt;/PRE&gt;
&lt;P&gt;You will then have all the information about one event (admission/release/street) on one observation - much easier to work with. &amp;nbsp;You can use agregates and functions to go down the rows quite siplpy as the data strucure doesn't change.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 08:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270903#M53879</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-05-17T08:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270979#M53896</link>
      <description>&lt;P&gt;thanks, this looks good- exactly what I want and easier to&amp;nbsp;follow since I am sharing it with others who do not know much of SAS. But I do get an error when I run this code- probably because not all records have all 15 admission/release dates&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;ERROR: Invalid DO loop control information, either the INITIAL or TO expression is missing or the&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;BY expression is missing, zero, or invalid.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Create a record for each month based on admission and release date;&lt;/P&gt;
&lt;P&gt;data &lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;have_monthly;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;set &lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;have_flipped;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;N_interval = intck(&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;'month'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;, date_admission, date_release);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;do &lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;i=&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;to&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt; N_interval+&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Month=intnx(&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;'month'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;, date_admission, i-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;'b'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Status=&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt; i=(N_interval+&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;) and release_type=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;&lt;FONT color="#800080" size="2" face="Courier New"&gt;'Y'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;&lt;FONT color="#0000ff" size="2" face="Courier New"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt; status=&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;0&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;output&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;end&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;format &lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;month &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;&lt;FONT color="#008080" size="2" face="Courier New"&gt;yymon7.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;keep &lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;ID month status;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run&lt;FONT size="2" face="Courier New"&gt;&lt;FONT size="2" face="Courier New"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 13:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270979#M53896</guid>
      <dc:creator>malena</dc:creator>
      <dc:date>2016-05-17T13:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270997#M53904</link>
      <description>&lt;P&gt;Try and fix it on your own first please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your correct in that if your missing values it generates an error. So create an if condition around the NInterval and do loop calculations.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If if you can't get it to work post you code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 14:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270997#M53904</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-17T14:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270998#M53905</link>
      <description>&lt;P&gt;what kind of loop condition do I need?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 14:25:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/270998#M53905</guid>
      <dc:creator>malena</dc:creator>
      <dc:date>2016-05-17T14:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/271040#M53917</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need an IF condition around the loop already present.&lt;/P&gt;
&lt;P&gt;The logic is, if admission date is missing then we don't enter the loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If NOT MISSING(date_admission) then do;&lt;/P&gt;
&lt;P&gt;*code that executes if date_admission is not missig/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 17:30:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/271040#M53917</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-17T17:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create monthly dummy variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/274817#M54891</link>
      <description>&lt;P&gt;following the creation of these monthly variables DOC1-DOC48 and only having month_death and year_death on deaths- how could I run a survival analysis? comparing inmmates vs noninmmates?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 21:29:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-monthly-dummy-variables/m-p/274817#M54891</guid>
      <dc:creator>malena</dc:creator>
      <dc:date>2016-06-02T21:29:43Z</dc:date>
    </item>
  </channel>
</rss>

