<?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: Calculate a dummy variable for before and after CEO turnover in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898764#M355244</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/438372"&gt;@Fer_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your reply. First, I want to calculate CEO turnover for the dataset that I have which has GVKEY, Executive ID and year.&lt;/P&gt;
&lt;P&gt;Then, if I need a dummy variable which&lt;SPAN&gt;&amp;nbsp;equals to one if CEO turnover happen one year before my event and equals to zero if CEO turnover happen one year after the event.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The main question is calculating CEO turnover. &lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What event are you referring to? How would we detect this event from the data you show?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 12:30:26 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-10-16T12:30:26Z</dc:date>
    <item>
      <title>Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898696#M355224</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a dummy variable which equal to one if CEO turnover happen one year before my event and equals to zero if CEO turnover happen one year after the event. I have gvkey and year for each firm. Executive ID for CEOs and also a date for the event (year of each event).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my dataset:&amp;nbsp;&lt;/P&gt;&lt;P&gt;GVKEY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; year&amp;nbsp; &amp;nbsp; &amp;nbsp; Executive ID&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1990&amp;nbsp; &amp;nbsp; &amp;nbsp;01891&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1991&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;01891&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1993&amp;nbsp; &amp;nbsp; &amp;nbsp;01891&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2001&amp;nbsp; &amp;nbsp; &amp;nbsp;21841&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2002&amp;nbsp; &amp;nbsp; 21841&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2003&amp;nbsp; &amp;nbsp; &amp;nbsp;21841&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;I appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2023 23:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898696#M355224</guid>
      <dc:creator>Fer_</dc:creator>
      <dc:date>2023-10-15T23:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898711#M355231</link>
      <description>&lt;P&gt;Sorry, but i don't understand what you expect as output. Also i don't see the variable containing the event date in your data, in fact i don't see data at all. "Data" means a working data step creating the data you have.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 08:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898711#M355231</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-10-16T08:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898712#M355232</link>
      <description>&lt;P&gt;Thanks for your reply. First, I want to calculate CEO turnover for the dataset that I have which has GVKEY, Executive ID and year.&lt;/P&gt;&lt;P&gt;Then, if I need a dummy variable which&lt;SPAN&gt;&amp;nbsp;equals to one if CEO turnover happen one year before my event and equals to zero if CEO turnover happen one year after the event.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The main question is calculating CEO turnover. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 08:39:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898712#M355232</guid>
      <dc:creator>Fer_</dc:creator>
      <dc:date>2023-10-16T08:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898719#M355233</link>
      <description>&lt;P&gt;For both gvkey you have posted the ExecutiveID is constant, so: what do expect exactly as output from the information you have posted?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 09:37:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898719#M355233</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2023-10-16T09:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898764#M355244</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/438372"&gt;@Fer_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for your reply. First, I want to calculate CEO turnover for the dataset that I have which has GVKEY, Executive ID and year.&lt;/P&gt;
&lt;P&gt;Then, if I need a dummy variable which&lt;SPAN&gt;&amp;nbsp;equals to one if CEO turnover happen one year before my event and equals to zero if CEO turnover happen one year after the event.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The main question is calculating CEO turnover. &lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What event are you referring to? How would we detect this event from the data you show?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898764#M355244</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-16T12:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898772#M355245</link>
      <description>&lt;P&gt;Let me change my dataset to :&amp;nbsp;&lt;/P&gt;&lt;P&gt;event=1 means that company have the event at that year and 0 means it does not have that event.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GVKEY&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; year&amp;nbsp; &amp;nbsp; &amp;nbsp; Executive ID&amp;nbsp; &amp;nbsp; Event&amp;nbsp;&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1990&amp;nbsp; &amp;nbsp; &amp;nbsp;01891&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1991&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;01891&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;001050&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1993&amp;nbsp; &amp;nbsp; &amp;nbsp;01891&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2001&amp;nbsp; &amp;nbsp; &amp;nbsp;21841&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2002&amp;nbsp; &amp;nbsp; 21841&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;001052&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2003&amp;nbsp; &amp;nbsp; &amp;nbsp;21841&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 12:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898772#M355245</guid>
      <dc:creator>Fer_</dc:creator>
      <dc:date>2023-10-16T12:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898777#M355247</link>
      <description>&lt;P&gt;You haven't addressed the issue from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;, who said&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;so: what do expect exactly as output from the information you have posted?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please show us what the output from this example should look like.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898777#M355247</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-16T13:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898779#M355248</link>
      <description>&lt;P&gt;I need a dummy variable which&amp;nbsp;&lt;SPAN&gt;equals to one if CEO turnover happen one year before the event and equals to zero if CEO turnover happen one year after the event.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The process of the codes will be like: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;First, I want to have CEO turnover for the dataset according to&amp;nbsp; GVKEY, Executive ID and year.&lt;/P&gt;&lt;P&gt;Second, having a dummy variable which equals to one if CEO turnover happens one year before the event (event=1) and zero, one year after that event.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It has two steps, calculating CEO turnover and then creating dummy variable when event=1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;dummy =1 when event=1 and CEO turnover happens one year before the year that I have event=1 and dummy=0&amp;nbsp;when event=1 and CEO turnover happens one year after the year that I have event=1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898779#M355248</guid>
      <dc:creator>Fer_</dc:creator>
      <dc:date>2023-10-16T13:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a dummy variable for before and after CEO turnover</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898783#M355250</link>
      <description>&lt;P&gt;I asked:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Please show us what the output from this example should look like.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You didn't show us what you want. Please SHOW US the desired output data set from this data.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, you do not have even a single instance of CEO turnover in your data. Please provide a data set that represents the problem description.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 13:26:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculate-a-dummy-variable-for-before-and-after-CEO-turnover/m-p/898783#M355250</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-16T13:26:00Z</dc:date>
    </item>
  </channel>
</rss>

