Hi,
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")));
run;
%end;
%else %do;
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
Hi,
you can just use
level="1" even if it is numerical.
In this way it works.
Andrea Nizzardo
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: