<?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: creating a transition variable panel data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802578#M81661</link>
    <description>&lt;P&gt;Please supply example data in data steps with datalines, and show what you expect to get out of that.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2022 07:01:48 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-03-17T07:01:48Z</dc:date>
    <item>
      <title>creating a transition variable panel data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802573#M81660</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have three waves of panel data 2008, 2012, 2016 and I would like to create a variable indicating transitions in employment. For example, if a person was employed in 2008, but unemployed in 2012, how would I code for this? Or if in 2012 a person went from employed to retired. Overall, I need to create a series of variables indicating change in employment status across these three years (e.g., employed 2008 to part-time 2012; employed 2008 unemployed 2016; etc.). I appreciate any help you all can provide.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Violet77&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 06:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802573#M81660</guid>
      <dc:creator>violet77</dc:creator>
      <dc:date>2022-03-17T06:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: creating a transition variable panel data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802578#M81661</link>
      <description>&lt;P&gt;Please supply example data in data steps with datalines, and show what you expect to get out of that.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 07:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802578#M81661</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-17T07:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: creating a transition variable panel data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802606#M81662</link>
      <description>&lt;P&gt;As Kurt says, it depends on the format of your data, but in general the idea is to create a so-called "transition matrix." A transition matrix shows the former state (unemployed, employed, retired,....) versus the new state. Here is an example. For each employee, use the "Initial" variable to describe the state at the&amp;nbsp; beginning of the year. Use the "Final" variable to describe their state at the end of the year. In this company, many employees were promoted, some were not, and no one left the company or was demoted:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data Have;
length Initial Final $16;
input ID Initial $ Final $;
datalines;
001 Hourly   Salaried
002 Salaried Management1
003 Management1 Management2
004 Management2 UpperManagement
005 UpperManagement VP
006 Hourly   Hourly
007 Hourly   Hourly
008 Salaried Salaried
009 Management2 Management2
010 UpperManagement VP
011 Hourly   Salaried
012 Salaried Salaried
013 Management1 Management2
014 Management2 UpperManagement
015 Salaried Management1
016 Hourly   Salaried
017 Salaried Management1
018 Hourly   Salaried
019 Hourly   Salaried
020 Management1 Management2
;

proc freq data=Have order=data;
tables initial*Final / nocum norow nocol nopercent;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to do this for every year, add a YEAR variable to the data and include a BY YEAR statement in the procedure to repeat the analysis for every year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 10:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/creating-a-transition-variable-panel-data/m-p/802606#M81662</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2022-03-17T10:11:35Z</dc:date>
    </item>
  </channel>
</rss>

