<?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: Count and classify in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608491#M17682</link>
    <description>How big is your data? Assuming you’re using the cloud service, Academics on Demand and not running locally, there are size limits to what you can upload and use on the site. If you’re affiliated with an academic institution you can usually get a full desktop license for a low cost (around $100).</description>
    <pubDate>Sat, 30 Nov 2019 21:26:19 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-11-30T21:26:19Z</dc:date>
    <item>
      <title>Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608387#M17661</link>
      <description>&lt;P&gt;Hi - I have a dataset where each record is a count of how many times a physician prescribed a certain drug.&amp;nbsp; I would like to calculate how many times each physician prescribed opioids and nonopioids so that I can classify the physician as a "high subscriber" if the count of opioids is over a certain number.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any advice on how I can approach this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AMT&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 23:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608387#M17661</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2019-11-29T23:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608388#M17662</link>
      <description>&lt;P&gt;You (or someone) has to classify each drug prescribed as either opioid or non-opioid. Then PROC FREQ will count the number of times each physician prescribes opioid or non-opioid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;... so&amp;nbsp;&lt;SPAN&gt;that I can classify the physician as a "high subscriber" if the count of opioids is over a certain number.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shouldn't that say: if the percent of opioids is over some pre-determined percent?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 00:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608388#M17662</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T00:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608392#M17663</link>
      <description>&lt;P&gt;I have the drugs specified as either opioid or nonopioid.&amp;nbsp; PROC FREQ gives me the variables individually.&amp;nbsp; I want FREQ by provider&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Angie&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 01:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608392#M17663</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2019-11-30T01:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608394#M17664</link>
      <description>Well, show your PROC FREQ or data. You likely just did your PROC FREQ wrong. Did you do it by Provider and Opioid variable?</description>
      <pubDate>Sat, 30 Nov 2019 01:23:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608394#M17664</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-30T01:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608397#M17665</link>
      <description>&lt;P&gt;I am using SAS for Academics.&amp;nbsp; Everytime I run this, I get an error that SAS needs to close.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC FREQ DATA=WORK&lt;/P&gt;&lt;P&gt;tables npi*class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a subset of the data.&amp;nbsp; I could not load the entire file as it is too large.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 01:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608397#M17665</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2019-11-30T01:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608412#M17670</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221595"&gt;@AMMAN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we only get partial information then it's a bit hard to really know where things don't work for you.&lt;/P&gt;
&lt;P&gt;Have you already read these guidelines &lt;A href="https://communities.sas.com/t5/Getting-Started/How-to-get-fast-helpful-answers/ta-p/226133" target="_self"&gt;here&lt;/A&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the code you've just posted: Looks like there is a semicolon missing after the Proc part of the statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FREQ DATA=WORK.want;
  tables npi*class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Nov 2019 04:14:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608412#M17670</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-11-30T04:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608439#M17674</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221595"&gt;@AMMAN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using SAS for Academics.&amp;nbsp; Everytime I run this, I get an error that SAS needs to close.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ DATA=WORK&lt;/P&gt;
&lt;P&gt;tables npi*class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a subset of the data.&amp;nbsp; I could not load the entire file as it is too large.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is in the Excel file is irrelevant here. One of the things that you can do is to actually look at the SAS data set WORK (not the Excel file) and see if you can find something wrong; or if it looks okay. If something looks wrong and you can't figure out how to fix it, then we need to see &lt;EM&gt;a portion of&lt;/EM&gt; the SAS data set (following &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="_self"&gt;these instructions&lt;/A&gt;) and not the original Excel file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(And as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; said, make sure you fix obvious errors in your code before coming here to ask further questions, such as fixing the missing semi-colon issue he mentions)&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608439#M17674</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-30T17:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608462#M17677</link>
      <description>&lt;P&gt;You're quick to assume the missing semi-colon wasn't an innocent mistake.&amp;nbsp; I keyed the code in the chat box quickly because my cut and paste from EG was lost when I tried to attach the full file which caused an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a beginner's forum.&amp;nbsp; You could try to be friendly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 17:39:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608462#M17677</guid>
      <dc:creator>AMMAN</dc:creator>
      <dc:date>2019-11-30T17:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608477#M17678</link>
      <description>&lt;P&gt;I can assure you that we all try to be friendly. But please try to understand our suggestions. Our only goal is to help you solve your problem.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 19:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608477#M17678</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-11-30T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608491#M17682</link>
      <description>How big is your data? Assuming you’re using the cloud service, Academics on Demand and not running locally, there are size limits to what you can upload and use on the site. If you’re affiliated with an academic institution you can usually get a full desktop license for a low cost (around $100).</description>
      <pubDate>Sat, 30 Nov 2019 21:26:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608491#M17682</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-30T21:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count and classify</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608878#M17772</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/221595"&gt;@AMMAN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I am using SAS for Academics.&amp;nbsp; Everytime I run this, I get an error that SAS needs to close.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FREQ DATA=WORK&lt;/P&gt;
&lt;P&gt;tables npi*class;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a subset of the data.&amp;nbsp; I could not load the entire file as it is too large.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you intended to use a count variable, such as your bene_count to indicate the number of times that provide did something you would use that variable on a WEIGHT statement. Otherwise each of those records only gets counted for one&amp;nbsp;prescription.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing you might try is to add NOPRINT to the proc statement as the table output in the results could be excessive.&lt;/P&gt;
&lt;PRE&gt;PROC FREQ DATA=WORK noprint;
tables npi*class / out=work.freq (drop=percent);
weight bene_count;
run;&lt;/PRE&gt;
&lt;P&gt;I think that I might be tempted to include a row percentage. Consider if you&amp;nbsp;pick 700 as your "count" of opioids to be "high"?&lt;/P&gt;
&lt;P&gt;If you have one provider with 500 prescriptions and 490 of them are opioids you wouldn't see that one as "high" but another provider with 100,000 total prescriptions and 701 would be. The first having 98 percent opioids wouldn't meet the threshold but the other with 0.7 percent would. So I might consider a percentage of opioid prescriptions coupled with a minimum number of total prescriptions.&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;PROC FREQ DATA=WORK noprint;
tables npi*class / outpct out=work.freq (drop=percent  pct_col);
weight bene_count;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2019 22:10:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Count-and-classify/m-p/608878#M17772</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-02T22:10:48Z</dc:date>
    </item>
  </channel>
</rss>

