<?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: Dealing with overlapping variables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751757#M29711</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;For example, an individual selected income_1 and income_21. This should both go in two groups. For example,&amp;nbsp; group 1 and group 4.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;From your code, it looks as if this individual should be in groups 1 and 3. Am I understanding you properly?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want an individual to be in two groups, there are a number of solutions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;multiple records for this individual&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;multiple variables to indicate multiple group membership&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;a text string, such as "1 3" to indicate that the indivdiual is in groups 1 and 3.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which would you prefer? I vote for #1, it has the most advantages and the fewest drawbacks, in my opinion, although it really depends on what happens next. So, I ask the obvious question: what is the next step, what analysis, chart or report are you going to do?&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 14:58:17 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-07-02T14:58:17Z</dc:date>
    <item>
      <title>Dealing with overlapping variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751747#M29710</link>
      <description>&lt;DIV&gt;I am looking to create a new variable for employment. The way it is coded right now does not give me the correct frequency distribution because the variables are overlapping. For example, an individual selected income_1 and income_21. This should both go in two groups. For example,&amp;nbsp; group 1 and group 4.&amp;nbsp; SAS is counting the individual for one group and not the other. I am guessing it is because an individual cannot be present in both groups.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have tried different methods but nothing seems to work. Do you recommend any way of handling overlapping variables? I have attached the code below.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;*creating an employement variable;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;if income_flag=0 then do;&lt;/DIV&gt;&lt;DIV&gt;if income_1 eq 1 or income_2 eq 1 or income_3 eq 1 then employment_4cat=1;/* group 1*/&lt;/DIV&gt;&lt;DIV&gt;if income_12 eq 1 or income_13 eq 1 or income_14 eq 1 or income_15 eq 1 or income_16 eq 1 or income_17 eq 1 then employment_4cat=2; /*group 2*/&lt;/DIV&gt;&lt;DIV&gt;if income_6 eq 1 or income_7 eq 1 or income_8 eq 1 or income_9 eq 1 or income_10 eq 1 or income_21 eq 1 then employment_4cat=2= 3;/*group 3*/ &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if income_4 eq 1 or income_5 eq 1 or income_11 eq 1 or income_18 eq 1 or income_19 eq 1 or income_compl= "18 years old, left home 2 weeks ago, no source of income at all" then employment_4cat=2=4; /*group 4*/&lt;/DIV&gt;&lt;DIV&gt;end;&lt;/DIV&gt;&lt;DIV&gt;if income_flag=1 then employment_4cat=.;&lt;/DIV&gt;&lt;DIV&gt;label employment_4cat= "Employment Status";&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 14:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751747#M29710</guid>
      <dc:creator>Suf12345</dc:creator>
      <dc:date>2021-07-02T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with overlapping variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751757#M29711</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;For example, an individual selected income_1 and income_21. This should both go in two groups. For example,&amp;nbsp; group 1 and group 4.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;From your code, it looks as if this individual should be in groups 1 and 3. Am I understanding you properly?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want an individual to be in two groups, there are a number of solutions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;multiple records for this individual&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;multiple variables to indicate multiple group membership&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;a text string, such as "1 3" to indicate that the indivdiual is in groups 1 and 3.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which would you prefer? I vote for #1, it has the most advantages and the fewest drawbacks, in my opinion, although it really depends on what happens next. So, I ask the obvious question: what is the next step, what analysis, chart or report are you going to do?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 14:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751757#M29711</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-07-02T14:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with overlapping variables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751801#M29712</link>
      <description>&lt;P&gt;Thanks for your input!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would you go about creating multiple records for each individual?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This variable would be one of my independent variables for my analysis.&amp;nbsp;The next step would be to:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a frequency table comparing individuals in the different groups&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Conduct a Poisson Logistic Regression Analysis looking at the association between this variable and the independent variable&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Fri, 02 Jul 2021 18:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Dealing-with-overlapping-variables/m-p/751801#M29712</guid>
      <dc:creator>Suf12345</dc:creator>
      <dc:date>2021-07-02T18:14:13Z</dc:date>
    </item>
  </channel>
</rss>

