<?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: Post-treatment data manipulation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443975#M282907</link>
    <description>&lt;P&gt;Thank you! However,.... Now I realized that I mis-specified turnover value. Can you help me find the turnover event? Like...&lt;/P&gt;&lt;P&gt;ID YEAR Manager Turnover&lt;/P&gt;&lt;P&gt;1 1990 a 0&lt;/P&gt;&lt;P&gt;1 1991 a 0&lt;/P&gt;&lt;P&gt;1 1992 b 1&lt;/P&gt;&lt;P&gt;1 1993 b 0&lt;/P&gt;&lt;P&gt;1 1994 b 0&lt;/P&gt;&lt;P&gt;1 1995 c 1&lt;/P&gt;&lt;P&gt;1 1996 c 0&lt;/P&gt;&lt;P&gt;1 1997 c 0&lt;/P&gt;&lt;P&gt;2 1993 d 0&lt;/P&gt;&lt;P&gt;2 1994 d 0&lt;/P&gt;&lt;P&gt;2 1995 d 0&lt;/P&gt;&lt;P&gt;2 1996 e 1&lt;/P&gt;&lt;P&gt;2 1997 e 0&lt;/P&gt;&lt;P&gt;2 1998 e 0&lt;/P&gt;&lt;P&gt;2 1999 e 0&lt;/P&gt;&lt;P&gt;2 2000 e 0&lt;/P&gt;&lt;P&gt;2 2001 e 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me create the turnover column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 04:29:21 GMT</pubDate>
    <dc:creator>hkim3677</dc:creator>
    <dc:date>2018-03-09T04:29:21Z</dc:date>
    <item>
      <title>Post-treatment data manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443959#M282903</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on my research project and have been struggling with assign 1 for post-treatment group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example,&lt;/P&gt;&lt;P&gt;Data test;&lt;BR /&gt;input ID YEAR TURNOVER;&lt;BR /&gt;datalines;&lt;BR /&gt;1 1990 0&lt;BR /&gt;1 1991 0&lt;BR /&gt;1 1992 1&lt;BR /&gt;1 1993 0&lt;BR /&gt;1 1994 0&lt;BR /&gt;1 1995 1&lt;BR /&gt;1 1996 0&lt;BR /&gt;1 1997 0&lt;BR /&gt;2 1993 0&lt;BR /&gt;2 1994 0&lt;BR /&gt;2 1995 0&lt;BR /&gt;2 1996 1&lt;BR /&gt;2 1997 0&lt;BR /&gt;2 1998 0&lt;BR /&gt;2 1999 0&lt;BR /&gt;2 2000 0&lt;/P&gt;&lt;P&gt;2 2001 0&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case,&amp;nbsp; we have two firms and each firm has one or two turnover event. The problem that I need to solve is how to create the "Post_Turnover" by each firm. If the firm has two turnovers, the overlapped period between first and second turnover is needed to be duplicated and set "Post_Turnover"&amp;nbsp; = 1 to half of the duplicated observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me this code!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 02:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443959#M282903</guid>
      <dc:creator>hkim3677</dc:creator>
      <dc:date>2018-03-09T02:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Post-treatment data manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443965#M282904</link>
      <description>&lt;P&gt;what should the output look like?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 03:19:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443965#M282904</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-03-09T03:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Post-treatment data manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443968#M282905</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset should look like...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ID YEAR TURNOVER Post_Turnover;&lt;BR /&gt;1 1990 0 0&lt;BR /&gt;1 1991 0 0&lt;BR /&gt;1 1992 1 1&lt;BR /&gt;1 1993 0 1&lt;BR /&gt;1 1994 0 1&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 1993 0 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1994 0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1 1995 1 1&lt;BR /&gt;1 1996 0 1&lt;BR /&gt;1 1997 0 1&lt;BR /&gt;2 1993 0 0&lt;BR /&gt;2 1994 0 0&lt;BR /&gt;2 1995 0 0&lt;BR /&gt;2 1996 1 1&lt;BR /&gt;2 1997 0 1&lt;BR /&gt;2 1998 0 1&lt;BR /&gt;2 1999 0 1&lt;BR /&gt;2 2000 0 1&lt;/P&gt;&lt;P&gt;2 2001 0 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following two observations were duplicated for pre-treatment for the second turnover since this period is between two turnovers.&lt;BR /&gt;&lt;SPAN&gt;1 1993 0 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1994 0 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 03:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443968#M282905</guid>
      <dc:creator>hkim3677</dc:creator>
      <dc:date>2018-03-09T03:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Post-treatment data manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443970#M282906</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  input ID YEAR TURNOVER;
datalines;
1 1990 0
1 1991 0
1 1992 1
1 1993 0
1 1994 0
1 1995 1
1 1996 0
1 1997 0
2 1993 0
2 1994 0
2 1995 0
2 1996 1
2 1997 0
2 1998 0
2 1999 0
2 2000 0
2 2001 0
run;
data WANT;
  retain TURNOVER_YEAR POST_TURNOVER;
  set HAVE;
  by ID;
  if first.ID then POST_TURNOVER=0;
  if TURNOVER and POST_TURNOVER=1 then do;
    TMPYEAR=YEAR; 
    POST_TURNOVER=0;
    do YEAR=TURNOVER_YEAR+1 to TMPYEAR-1; 
      POST_TURNOVER=0; 
      output;
    end;
    YEARTMP=YEAR; 
    POST_TURNOVER=1;
  end;
  else if TURNOVER then do; 
    POST_TURNOVER =1; 
    TURNOVER_YEAR =YEAR;
  end;
  output;
  keep ID YEAR TURNOVER POST_TURNOVER;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 192pt;" border="0" width="256" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD width="64" height="17" class="xl68" style="height: 12.75pt; width: 48pt;"&gt;POST_TURNOVER&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="border-left: none; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="border-left: none; width: 48pt;"&gt;YEAR&lt;/TD&gt;
&lt;TD width="64" class="xl68" style="border-left: none; width: 48pt;"&gt;TURNOVER&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1990&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1991&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1992&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1993&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1994&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1993&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1994&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1995&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1996&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1997&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1993&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1994&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;0&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1995&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1996&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1997&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1998&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;1999&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2000&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" align="right" class="xl68" style="height: 12.75pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;2001&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 09 Mar 2018 03:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443970#M282906</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-03-09T03:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Post-treatment data manipulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443975#M282907</link>
      <description>&lt;P&gt;Thank you! However,.... Now I realized that I mis-specified turnover value. Can you help me find the turnover event? Like...&lt;/P&gt;&lt;P&gt;ID YEAR Manager Turnover&lt;/P&gt;&lt;P&gt;1 1990 a 0&lt;/P&gt;&lt;P&gt;1 1991 a 0&lt;/P&gt;&lt;P&gt;1 1992 b 1&lt;/P&gt;&lt;P&gt;1 1993 b 0&lt;/P&gt;&lt;P&gt;1 1994 b 0&lt;/P&gt;&lt;P&gt;1 1995 c 1&lt;/P&gt;&lt;P&gt;1 1996 c 0&lt;/P&gt;&lt;P&gt;1 1997 c 0&lt;/P&gt;&lt;P&gt;2 1993 d 0&lt;/P&gt;&lt;P&gt;2 1994 d 0&lt;/P&gt;&lt;P&gt;2 1995 d 0&lt;/P&gt;&lt;P&gt;2 1996 e 1&lt;/P&gt;&lt;P&gt;2 1997 e 0&lt;/P&gt;&lt;P&gt;2 1998 e 0&lt;/P&gt;&lt;P&gt;2 1999 e 0&lt;/P&gt;&lt;P&gt;2 2000 e 0&lt;/P&gt;&lt;P&gt;2 2001 e 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me create the turnover column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 04:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Post-treatment-data-manipulation/m-p/443975#M282907</guid>
      <dc:creator>hkim3677</dc:creator>
      <dc:date>2018-03-09T04:29:21Z</dc:date>
    </item>
  </channel>
</rss>

