BookmarkSubscribeRSS Feed
HitmonTran
Pyrite | Level 9

hello, I'm trying to output a sas dataset for my one-sided p-values in proc freq step.

 

ods output CrossTabFreqs=want;

proc freq data=a; 
where treatn="virus";
table TFRELPRC_STD/binomial(p=0.234 level="Y") ; 
run;
 

HitmonTran_0-1667406170090.png

 

3 REPLIES 3
ballardw
Super User

I think you are looking for

ods output binomialtest=want;

for the p values. There will be one row, matching the displayed table.

 

You can look up the table names in the documentation for Proc Freq under the Details tab with the ODS Table Names and see which tables are created by which Tables options. Or use ODS TRACE on; and ODS trace off; around the procedure you use to see which tables are generated by your code.

 

If you one one way freqs then request table ONEWAYFREQS, not Crosstabfreqs.

PaigeMiller
Diamond | Level 26
proc freq data=a; 
ods output binomialtest=binomialtest;
where treatn="virus";
table TFRELPRC_STD/binomial(p=0.234 level="Y") ; 
run;
--
Paige Miller
Ksharp
Super User
proc freq data=a; 
where treatn="virus";
table TFRELPRC_STD/binomial(p=0.234 level="Y") ; 
output out=want binomial;
run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1534 views
  • 0 likes
  • 4 in conversation