SAS documentation describes the 'senspec' option using PROC FREQ. This can be applied to a 2*2 table. When I use it in this context:
proc freq data=new order=data;
tables test*response / senspec;
run;
I get the error message attached. The error suggestions that senspec is not a valid option. SAS documentation says that it is https://documentation.sas.com/?docsetId=procstat&docsetTarget=procstat_freq_details53.htm&docsetVers...
Hi:
In looking at the "what's new" documentation for SAS/STAT, it looks like that option was just introduced in SAS/STAT 15.1:
When I run PROC PRODUCT_STATUS on my SAS OnDemand account ( which has SAS/STAT 15.1), the SENSPEC option works for me. If you run this PROC PRODUCT_STATUS;
RUN;
You should see the SAS/STAT version in the log:
I can't tell your version from your screen shot but my guess is that the version of SAS/STAT that you're running might be a lower version. I can duplicate the error message on a system that's only running SAS/STAT 14.3, for example.
Hope this helps,
Cynthia
Hello @ldierker,
The option SENSPEC was introduced in SAS release 9.4M6 (see What’s New in SAS® 9.4 and SAS® Viya® 3.4), but you and many others (including myself) are still using an older release. Of course, for these relatively simple statistics there are workarounds: see Usage Note 24170: Estimating sensitivity, specificity, positive and negative predictive values, and ....
Hi:
In looking at the "what's new" documentation for SAS/STAT, it looks like that option was just introduced in SAS/STAT 15.1:
When I run PROC PRODUCT_STATUS on my SAS OnDemand account ( which has SAS/STAT 15.1), the SENSPEC option works for me. If you run this PROC PRODUCT_STATUS;
RUN;
You should see the SAS/STAT version in the log:
I can't tell your version from your screen shot but my guess is that the version of SAS/STAT that you're running might be a lower version. I can duplicate the error message on a system that's only running SAS/STAT 14.3, for example.
Hope this helps,
Cynthia
Cynthia, Fantastic! Yes it currently works in SAS OnDemand. This is ideal since I will be using this with students. I had been working with my licensed version of SAS and did not think to check out the OnDemand platform. Thank you. Lisa
You don't need this, but it is also easy to get the required statistics from PROC LOGISTIC. You probably already read this, but others may find this useful, using the example from the new option in FREQ.
proc logistic data=fatcomp descending; class test; model response = test / ctable pprob=0.5; freq count; run;
LOGISTIC uses a leave-one-out algorithm to reduce bias, but I doubt if this will have much of an effect with data like this (already in a 2x2 table). Technically, LOGISTIC is first fitting a model, so it is more complex than needed. Note that you can get PPV and NPV from the FalsePOS and FalseNeg percentages in the LOGISTIC output.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.