Hi SAS communities,
I am looking for a solution to print more decimals for my p-values generated via a proc freq chisq procedure. I would ideally like to have 10-12 decimals printed as I am performing bivariate analyses and need to compare highly significant values (currently all my p-values are printing <0.0001). I'm definitely open to other ways to get a p-value other than a proc freq chisq procedure, I just need to be able to test the association between two variables.
Thank you!
Hi @mlensing,
I mostly use an ODS output dataset if I want to see more decimals of a statistic. In your example add
ods output chisq=csq;
before (or in) the PROC FREQ step -- csq is just an arbitrary dataset name. Then use, e.g., PROC PRINT to show the values with a suitable format:
proc print data=csq;
format prob 14.12;
run;
To change the display format directly in PROC FREQ output, you would need to modify the ODS template. I recently suggested this in another thread: https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/6...
Hi @mlensing,
I mostly use an ODS output dataset if I want to see more decimals of a statistic. In your example add
ods output chisq=csq;
before (or in) the PROC FREQ step -- csq is just an arbitrary dataset name. Then use, e.g., PROC PRINT to show the values with a suitable format:
proc print data=csq;
format prob 14.12;
run;
To change the display format directly in PROC FREQ output, you would need to modify the ODS template. I recently suggested this in another thread: https://communities.sas.com/t5/Statistical-Procedures/Proc-mixed-formats-of-the-output-dataset/m-p/6...
You will likely get some push back on "more significant" (I'm one) but just specify a larger value for the format such as
format variablename f32.30; to display up to 30 decimals. 32 is the maximum number of digits the format supports.
So send the output of the test to data set and use another procedure to print the result.
Note that there is likely to be some machine precision issues with anything showing 15 or more decimal places.
If you didn't pick your rejection regions/ significance level before the test the values are "not more significant".
Are you aware of statistical analyses or reports that find justification in ranking/comparing numerous p-values, all less than <.0001? I'd be very interested in knowing the context.
Hi all, thank you for your clarifying comments. I am needing to "compare significance" among my bivariate interactions to determine the order in which terms should be introduced into my logistic regression model to compare model fit through -2LL tests. The instructors for the course I am in that suggest this step tend to be against automated variable selection tools and so this is part of our intentional/purposeful modeling.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.