<?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: How to create a new variable by adding the re-coded values 1-9 and then making a new binary vari in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642039#M191488</link>
    <description>&lt;P&gt;You want to use an array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out the examples here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Apr 2020 18:02:20 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-04-22T18:02:20Z</dc:date>
    <item>
      <title>How to create a new variable by adding the re-coded values 1-9 and then making a new binary variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642028#M191479</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am working on a 6 datasets and want to recode a particular variable from 1-9. Following this, I would like to create a new variable by adding up the values of the recoded variables. This variable is to be called K6SUM.&amp;nbsp;Based on the K6SUM variable, I want to create a grouping variable called “SPD” as a binary variable. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance:)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 17:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642028#M191479</guid>
      <dc:creator>shridula95</dc:creator>
      <dc:date>2020-04-22T17:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new variable by adding the re-coded values 1-9 and then making a new binary vari</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642031#M191482</link>
      <description>&lt;P&gt;Provide some example data and walk us through what you want.&lt;/P&gt;
&lt;P&gt;How to create the recodes when we don't know the current variable type or values is pretty difficult.&lt;/P&gt;
&lt;P&gt;Plus, since you are adding values of 1 through 9, apparently, then you can have sums all over place. So what would the rule be for creating a binary variable from those sums?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 17:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642031#M191482</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-04-22T17:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new variable by adding the re-coded values 1-9 and then making a new binary vari</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642039#M191488</link>
      <description>&lt;P&gt;You want to use an array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out the examples here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 18:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642039#M191488</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-04-22T18:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new variable by adding the re-coded values 1-9 and then making a new binary vari</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642056#M191493</link>
      <description>&lt;P&gt;I am working on NHIS data sets from 2010-2015. The variable is called Serious Psychological Disorder(SPD). It has data fields as follows-&lt;/P&gt;&lt;P&gt;SAD, NERVOUS, RESTLESS, HOPELESS, EFFORT, WORTHLS. These variables take on values from 1 through 9. The re-coding is to be done as follows-&lt;/P&gt;&lt;P&gt;1 - ALL of the time (recode as 4)&lt;BR /&gt;2 - MOST of the time (recode as 3)&lt;BR /&gt;3 - SOME of the time (recode as 2)&lt;BR /&gt;4 - A LITTLE of the time (recode as 1)&lt;BR /&gt;5 - NONE of the time (recode as 0)&lt;BR /&gt;7 – Refused (recode as missing)&lt;BR /&gt;8 - Not ascertained (recode as missing)&lt;BR /&gt;9 - Don't know (recode as missing)&lt;BR /&gt;Following this, I need to create a new variable called K6SUM by taking the sum of the re-coded values as specified above. Based on the K6SUM variable, I have to create a grouping variable called “Serous psychological distress” (SPD) as follows:&lt;BR /&gt;SPD = 1 IF K6SUM 13+&lt;BR /&gt;SPD = 0 IF K6SUM 0-12&lt;BR /&gt;SPD = . (MISSING). IF K6SUM=.(MISSING).&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 18:48:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-new-variable-by-adding-the-re-coded-values-1-9/m-p/642056#M191493</guid>
      <dc:creator>shridula95</dc:creator>
      <dc:date>2020-04-22T18:48:33Z</dc:date>
    </item>
  </channel>
</rss>

