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

Hi,

I was wondering how increasing the number of decimal in the outputs of PROC GENMOD?

 

With this very simple model:

proc genmod data=SHARE.shareHI ;
class id;
model diff_hi=age_num age_num *age_num  / dist=n ;
repeated subject=id / type=exch; /
weight pond;
output out=work.predicted p=PredictedValue;
run;

 

I have this output:

 

 

Analysis Of GEE Parameter Estimates
Empirical Standard Error Estimates
Parameter Estimate Standard
Error
95% Confidence Limits Z Pr > |Z|
Intercept 0.0274 0.0230 -0.0176 0.0724 1.19 0.2324
age_num -0.0010 0.0007 -0.0024 0.0004 -1.39 0.1653
age_num*age_num 0.0000 0.0000 0.0000 0.0000 2.08 0.0372

 

 

 

The parameter for age_num*age_num is 0.0000, but significant (but I have no idea with this outputs what is the parameter).

I guess I could just multply the variable age_num by 10000, but I would prefer not touching it.

 

 
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

There are two ways. The display of every table in SAS is controlled by a template, and you can edit a template to get more precision in the numbers that are displayed. However, since you posted this to the New User's community, I will suggest a simpler solution. You can use the ODS OUTPUT statement to save any SAS table to a data set. You can then use PROC PRINT to display the data set with as much precision as you want. For example, here is some code that demonstrates how to save the GEEEmpPEst table (the one you are interested in) to a data set and then use the BESTDw. format  to display the values with extra precision:

 

proc genmod data=SHARE.shareHI;
class id;
model diff_hi = age_num age_num*age_num  / dist=n ;
repeated subject=id / type=exch; 
weight pond;
output out=work.predicted p=PredictedValue;
ods output GEEEmpPEst=GEEEst;  /* <== save table to data set */
run;

proc print data=GEEEst;
format Estimate Stderr LowerCL UpperCL BestD16.; /* set format for variables */
run;

View solution in original post

1 REPLY 1
Rick_SAS
SAS Super FREQ

There are two ways. The display of every table in SAS is controlled by a template, and you can edit a template to get more precision in the numbers that are displayed. However, since you posted this to the New User's community, I will suggest a simpler solution. You can use the ODS OUTPUT statement to save any SAS table to a data set. You can then use PROC PRINT to display the data set with as much precision as you want. For example, here is some code that demonstrates how to save the GEEEmpPEst table (the one you are interested in) to a data set and then use the BESTDw. format  to display the values with extra precision:

 

proc genmod data=SHARE.shareHI;
class id;
model diff_hi = age_num age_num*age_num  / dist=n ;
repeated subject=id / type=exch; 
weight pond;
output out=work.predicted p=PredictedValue;
ods output GEEEmpPEst=GEEEst;  /* <== save table to data set */
run;

proc print data=GEEEst;
format Estimate Stderr LowerCL UpperCL BestD16.; /* set format for variables */
run;

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
  • 1 reply
  • 3829 views
  • 2 likes
  • 2 in conversation