turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Exact p value proc reg

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 03:04 PM

I would appreciate it if someone could advise me on how to print out the exact p-value from a simple proc reg statement.

The model p-value output shows p<0.001 for some covariates but I would like the exact value like 0.000000000542

Thank you very much!

TW

Accepted Solutions

Solution

09-21-2017
04:51 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 03:12 PM

When you create an output data set from PROC REG using ODS OUTPUT, the p-value is automatically given a format which forces it to print as p<0.0001. If you give it a different format, it will print in whatever format you want. Although it's hard for me to envision a use for a p-value that is correct to 14 decimal places.

--

Paige Miller

Paige Miller

All Replies

Solution

09-21-2017
04:51 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 03:12 PM

When you create an output data set from PROC REG using ODS OUTPUT, the p-value is automatically given a format which forces it to print as p<0.0001. If you give it a different format, it will print in whatever format you want. Although it's hard for me to envision a use for a p-value that is correct to 14 decimal places.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PaigeMiller

09-21-2017 03:26 PM - edited 09-21-2017 03:27 PM

Adding:

I don't know what you are doing, but this seems like an abuse of the p-value, it seems like whatever use you might have for a p-value with 14 decimal places is invalid — with the possible except of confirming that your own algorithm to compute p-values matches SAS, and I'd be shocked if PROC REG was the right way to do this.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 03:19 PM - edited 09-21-2017 03:19 PM

Generate an output set as @PaigeMiller indicated and display the values with proc print, report or tabulate setting the desired format.

Or delve into the wonders of Proc Template and change the format in the table definition (WAY Overkill but would be the way if you don't want to send output to a data set.)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 04:51 PM

Thank you for your help!

I needed it for a GWAS problem where there are lots of multiple comparisons =)

Code that worked was:

ods output ParameterEstimates=pval1;

proc reg data= abc;

model aa = x1 x2 ;

run;

proc contents data=pval1; /*to identify label for pvalue*/

run;

data pval2;

set pval1;

format Probt pvalue15.13;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-21-2017 05:39 PM

Sorry, but you can't convince me that 14 decimal places are needed for multiple comparisons. This is improperly using the p-values.

--

Paige Miller

Paige Miller