Help using Base SAS procedures

proc freq binomial level=1

Regular Learner
Posts: 1

proc freq binomial level=1



I have a response variable codes as 1="Respnse" and 0 ="Non-Response". If i use level=0, i get an error stating that the level should be a positive integer. How do i get the proportion of non-responders?




%if %str(&tabnum)=%str(1049.1.1) /*or %str(&tabnum)=%str(1049.1.2)*/ or %str(&tabnum)=%str(1049.1.5) %then %do;


proc freq data=dsin;

BY &byvar viswin efques leg_sort;

tables  &value / binomial (level=1);

where not missing(remiss);

exact binomial;

ods output OneWayFreqs=freqs BinomialProp=ExactBiCI(where=(name1 in("XL_BIN", "XU_BIN")));




%else %do;


Respected Advisor
Posts: 2,655

Re: proc freq binomial level=1

Posted in reply to ashleyazar

The LEVEL= option refers to the variable level (or order), not to the actual value itself.  If you use LEVEL=1, it will give you the proportion of Non-responders (=0).  Compare it to LEVEL=2, which should give the number of responders (=1).


Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation