<?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: Combining Continuous Variables per Observation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320234#M61928</link>
    <description>&lt;P&gt;Does this take into account that any one of the variables could have a value higher than 2 by itself?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And how do I view the output? Nothing is showing up in my results viewer.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2016 14:29:58 GMT</pubDate>
    <dc:creator>berhard</dc:creator>
    <dc:date>2016-12-20T14:29:58Z</dc:date>
    <item>
      <title>Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320209#M61926</link>
      <description>&lt;P&gt;I have three continuous variables, tot_doc_fp, tot_nurse_fp, and tot_mid_fp. For my analysis, I want to know if any combination of the values of the three variables is greater than or equal to 2 for any of the observations, and then for what percentage of observations the combined value is greater than or equal to 2. I'm on version 9.4.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 13:31:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320209#M61926</guid>
      <dc:creator>berhard</dc:creator>
      <dc:date>2016-12-20T13:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320216#M61927</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;tot_doc_fp=1;&lt;BR /&gt;tot_nurse_fp=1;&lt;BR /&gt;tot_mid_fp=1;&lt;BR /&gt;output;&lt;BR /&gt;tot_doc_fp=0;&lt;BR /&gt;tot_nurse_fp=0;&lt;BR /&gt;tot_mid_fp=0;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want(keep=fraction);&lt;BR /&gt;set have end=the_end;&lt;BR /&gt;if sum(tot_doc_fp,tot_nurse_fp,tot_mid_fp) ge 2 then count_true+1;&lt;/P&gt;
&lt;P&gt;if the_end then do;&lt;BR /&gt; fraction=count_true/_N_; output;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 13:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320216#M61927</guid>
      <dc:creator>chrej5am</dc:creator>
      <dc:date>2016-12-20T13:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320234#M61928</link>
      <description>&lt;P&gt;Does this take into account that any one of the variables could have a value higher than 2 by itself?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And how do I view the output? Nothing is showing up in my results viewer.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320234#M61928</guid>
      <dc:creator>berhard</dc:creator>
      <dc:date>2016-12-20T14:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320236#M61929</link>
      <description>&lt;P&gt;the condition is that the sum of the variables is greater or equal&amp;nbsp;2, so any value can be on the input. In detail if one variable is ge 2 the condition is true, if you want something else, please specify your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output fraction is stored in dataset want.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:37:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320236#M61929</guid>
      <dc:creator>chrej5am</dc:creator>
      <dc:date>2016-12-20T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320240#M61930</link>
      <description>&lt;P&gt;It is best practice here to provide some example data that covers all of your data cases and the desired results for that example data. If you have missing values, negative values, etc. examples should be included. Best is to follow instructions from here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; to create data step code that allows us to recreate your example data to test code against.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320240#M61930</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-12-20T14:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320243#M61931</link>
      <description>&lt;P&gt;I appreciate the code, but I'm still confused. The number I am getting is 0.5, but there are 135 observations, so that can't be correct.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320243#M61931</guid>
      <dc:creator>berhard</dc:creator>
      <dc:date>2016-12-20T14:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320252#M61932</link>
      <description>&lt;P&gt;OK, th first part of my code creates a dummy dataset have with two observation. View this dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the next part i count the frequency and output the percentage. For one observation the condition holds true, for the other it does not. So the fraction&amp;nbsp;is 0.5. I output this to the dataset want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to provide more info or adapt the code for your case yourself.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320252#M61932</guid>
      <dc:creator>chrej5am</dc:creator>
      <dc:date>2016-12-20T14:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Continuous Variables per Observation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320464#M61936</link>
      <description>&lt;P&gt;Better post an example to explain your question and don't forget post the output either.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2016 10:44:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Combining-Continuous-Variables-per-Observation/m-p/320464#M61936</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-12-21T10:44:04Z</dc:date>
    </item>
  </channel>
</rss>

