Programming the statistical procedures from SAS

Deciding the significant figures in output

Reply
Occasional Contributor
Posts: 5

Deciding the significant figures in output

Hello,

When I ran a data using SAS production environment, is there a way I could decide how many significant figure I want to get in my output?

 

Thank you

Samrita

 

Grand Advisor
Posts: 10,062

Re: Deciding the significant figures in output

You should be able to decide anything you want. But this question is very vague. You might provide more details of what you are doing and the output requirements.

Occasional Contributor
Posts: 5

Re: Deciding the significant figures in output

Sorry for not being clear about my question. Can I decide on the number of decimal point for the p-value that I get using this test?  I am looking for a decimal point of 6 for P-VALUSE for ABS_resid mean.

 

roc GLM DATA=Statistic;

CLASS Group;

Model BW=Group;

Output OUT=lEVENE_resid R=resid;

Run;

PROC GLM DATA=Statistic;

CLASS Group;

MODEL BW=Group;

OUTPUT OUT=Levene_resid R=resid;

RUN;

DATA Lev_resid;

SET Levene_resid;

ABS_resid = ABS(resid);

RUN;

PROC GLM DATA=Lev_resid;

CLASS group;

MODEL ABS_resid=Group;

RUN;

 

Thank you

Samrita

SAS Super FREQ
Posts: 3,319

Re: Deciding the significant figures in output

The procedure stored the p-value as a decimal value such as 0.0001234567. However, in the ODS table, the p-value is displayed by using the PVALUEw. format.  To learn about the PVALUEw. format, see "Formats for p-values and odds ratios in SAS."

 

If you would like to use a different format (or no format at all), you have two options.

 

The first option is to use ODS OUTPUT to write a table to a data set.  If you don't know the name of the table, read "Find the ODS table names produced by any procedure." Then USE PROC PRINT and the FORMAT statement to display the statistics in the format you prefer.

 For example, the following captures and displays the ModelANOVA table in PROC GLM:

proc GLM DATA=sashelp.class;
CLASS age;
Model height=age;
ods output modelANOVA=ANOVA;
Run;

proc print data=ANOVA;
format probF PVALUE8.6;
run;

The second option is if you want to permanently change the way the output appears every time that you run SAS. To do that, you can copy and modify the ODS template for the table.

Occasional Contributor
Posts: 5

Re: Deciding the significant figures in output

Thank you very much. Your answer was very helpful.

Ask a Question
Discussion stats
  • 4 replies
  • 121 views
  • 1 like
  • 3 in conversation