BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
putnick
Calcite | Level 5

I'm struggling to figure something out. In a proc mixed output of a long dataset (over 27,000 observations), my denominator degrees of freedom is coming up as  "19E3". Is this scientific notation to indicate that this is a longer number that wouldn't fit in the box (i.e., over 19,000)? How can I get sas to display the full degrees of freedom number? 

1 ACCEPTED SOLUTION

Accepted Solutions
putnick
Calcite | Level 5

Ah, thank you! Yes, that solved the problem. Sorry for not including the code at first. This was for a proc mixed with a random intercept and slope for repeated measurements of body mass measured across varying ages. The denominator degrees of freedom was the problem with "19E3" for the fixed effect of pollution.  This code solved it.

proc mixed data=BMI_long;
  class ID;
  model BMI = age pollution /solution;
  random int age /type=UN subject=ID;
  ods output SolutionF=parms;
run;

data parms_a;
  set parms;
  format DF 8.4;
run;

proc print data=parms_a;
run;

This gave me 19372 for the denominator degrees of freedom. I could have done the math for this simple model, but once I add in a bunch of covariates, I didn't want to get it wrong. Thanks!

View solution in original post

3 REPLIES 3
ballardw
Super User

Yes that 19E3 is likely indicating 19,000 (more or less lots of rounding involved) degrees of freedom. My suspicion seeing such is likely an inappropriate model but can't say for sure.

Since you did not mention which specific procedure is generating the output I cannot provide an exact answer for changing a display.

 

One way involves knowing which output generates the table and modifying one or more of the procedure default reporting templates. Not recommended for beginners and not really needed.

 

The main approach would be to send the output to a data set and then use another procedure like Proc Print with a different format. Depending on the procedure there may or may not be an OUTPUT or OUT= option to a data set for the specific result but that's one place to start.

The other is to use ODS OUTPUT with the table object name to create a data set. You can get a list of objects created by your procedure using (dummy code for example)

ods trace on;

proc whatever data=thisset;
<other proc statements>

ods trace off;

The LOG will show the objects created. You would then rerun the procedure with the ODS OUTPUT option using the desired object to create the data set

proc whatever data=thisset;
   ods output someobject= mydatasetname;
<other proc statements>
run;

Most procedures in the Details section of the online help have section on table names for this with the objects and the options to create them.

 

Hint: Always include your code if such is involved anywhere in the problem so we have a clue what you have done.

putnick
Calcite | Level 5

Ah, thank you! Yes, that solved the problem. Sorry for not including the code at first. This was for a proc mixed with a random intercept and slope for repeated measurements of body mass measured across varying ages. The denominator degrees of freedom was the problem with "19E3" for the fixed effect of pollution.  This code solved it.

proc mixed data=BMI_long;
  class ID;
  model BMI = age pollution /solution;
  random int age /type=UN subject=ID;
  ods output SolutionF=parms;
run;

data parms_a;
  set parms;
  format DF 8.4;
run;

proc print data=parms_a;
run;

This gave me 19372 for the denominator degrees of freedom. I could have done the math for this simple model, but once I add in a bunch of covariates, I didn't want to get it wrong. Thanks!

Tom
Super User Tom
Super User

You seem to have made poor choice of format to use to display DF.

24   data _null_;
25    df=19372 ;
26    put df 8.4;
27   run;

19372.00
NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds

I don't think that PROC will produce anything but INTGER values for degrees of freedom so why would you want to display four digits to the right of the decimal point?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 634 views
  • 0 likes
  • 3 in conversation