@AMMAN wrote:
I am using SAS for Academics. Everytime I run this, I get an error that SAS needs to close.
PROC FREQ DATA=WORK
tables npi*class;
run;
This is a subset of the data. I could not load the entire file as it is too large.
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 prescription.
One thing you might try is to add NOPRINT to the proc statement as the table output in the results could be excessive.
PROC FREQ DATA=WORK noprint;
tables npi*class / out=work.freq (drop=percent);
weight bene_count;
run;
I think that I might be tempted to include a row percentage. Consider if you pick 700 as your "count" of opioids to be "high"?
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.
Something like:
PROC FREQ DATA=WORK noprint;
tables npi*class / outpct out=work.freq (drop=percent pct_col);
weight bene_count;
run;
... View more