<?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 creating a new variable using existing variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-a-new-variable-using-existing-variables/m-p/591046#M169261</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;I have a data like this
				
PatientId 	Test A 	Test B	Test C 	Test D
1	0	1	1	0
2	0	0	0	1
3	0	1	0	0
4	1	0	0	1
5	1	1	1	0
6	0	0	0	1
7	1	1	0	0
8	0	0	0	1
9	0	1	1	0
10	0	0	0	1
11	0	1	0	0

I would like to know if patient is positive(1) in more than on test. how do i need to code?
Please help
			
          &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Sep 2019 21:16:07 GMT</pubDate>
    <dc:creator>Dhana18</dc:creator>
    <dc:date>2019-09-23T21:16:07Z</dc:date>
    <item>
      <title>creating a new variable using existing variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-new-variable-using-existing-variables/m-p/591046#M169261</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;I have a data like this
				
PatientId 	Test A 	Test B	Test C 	Test D
1	0	1	1	0
2	0	0	0	1
3	0	1	0	0
4	1	0	0	1
5	1	1	1	0
6	0	0	0	1
7	1	1	0	0
8	0	0	0	1
9	0	1	1	0
10	0	0	0	1
11	0	1	0	0

I would like to know if patient is positive(1) in more than on test. how do i need to code?
Please help
			
          &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Sep 2019 21:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-new-variable-using-existing-variables/m-p/591046#M169261</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2019-09-23T21:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new variable using existing variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-new-variable-using-existing-variables/m-p/591049#M169262</link>
      <description>&lt;P&gt;With your data and assuming the Test.. variables are numeric and only have values of missing, 0 or 1 something like below should work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  infile datalines dlm=' ' truncover;
  input PatientId Test_A Test_B Test_C Test_D;
  outcome_flg= sum(of test_:) &amp;gt; 1;
  datalines;
1 0 1 1 0
2 0 0 0 1
3 0 1 0 0
4 1 0 0 1
5 1 1 1 0
6 0 0 0 1
7 1 1 0 0
8 0 0 0 1
9 0 1 1 0
10 0 0 0 1
11 0 1 0 0
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Sep 2019 21:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-new-variable-using-existing-variables/m-p/591049#M169262</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-23T21:27:02Z</dc:date>
    </item>
  </channel>
</rss>

