BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
juliafervi
Calcite | Level 5

Dear all I have the following question:

 

How do I save or have direct (calling) acces to the some desired variables obtained using "proc freq / binomial test". 

 

I have been able to obtain the results in a separeted excel sheet... but that is not what I am looking for.

 

I would like to be able to call the varibales such as the "p" and the "confidence interval" results for then creating an END RESULT TABLE.

 

Thanks in advance,

Julia

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
ods output onewayfreqs=freqs binomial=binomial binomialtest=binomialtest;
proc freq data = have;
    tables variablename/binomial;
run;

In general, any SAS procedure output can be captured and placed into a SAS data set by using the proper ODS OUTPUT statement. 

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26
ods output onewayfreqs=freqs binomial=binomial binomialtest=binomialtest;
proc freq data = have;
    tables variablename/binomial;
run;

In general, any SAS procedure output can be captured and placed into a SAS data set by using the proper ODS OUTPUT statement. 

--
Paige Miller
juliafervi
Calcite | Level 5

Hi yes this seems to work. However the main point of the confidence limit are not in the output tables. 

 

I would like to obtain this information :

 

Confidence Limits for the Binomial ProportionProportion = 0.0933
Type95% Confidence Limits
Clopper-Pearson (Exact) 0.0520 0.1516

 

What would be the correct statement to call the confidence interval in the "ods output" ?

 

Thanks for the tip!! 

juliafervi
Calcite | Level 5
found "BinomialCLs" perfect for what I was looking for.

Thank you very much Paige Miller!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2424 views
  • 1 like
  • 2 in conversation