Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Proc Template to format Estimates from GLM/CLParm

Status
Not open for further replies.

PetrOtahal

Technical User
Dec 3, 2007
12
AU
I'm running the following GLM code:
Code:
proc glm data=shbg;
  model &modelDep = &BMImodelInd / solution clparm;
run;

And in order to format the number of decimal places in the output of the Parameter Estimates I use the following code:
Code:
proc template;
  edit Common.ParameterEstimates.Estimate; format=7.3; end;
  edit Common.ParameterEstimates.StdErr; format=7.3; end;
run;

The problem is that this doesn't change the number of decimal places for the Confidence Limits produce by the CLParm command.

Can you help?
 
I am not sure which section of the Common.ParameterEstimates template the CLPARM uses to format its data, but there are several other sections in this template that you could experiment with.

Try to change the format on the 'df', 'probt', 'StandardizedEst' and 'tvalue' sections. If it still doesn't change that value then call tech support.

(of course you would use the above mentioned section names as you did in your example)
ex.
Code:
Common.ParameterEstimates.df
Common.ParameterEstimates.Probt
Common.ParameterEstimates.StandardizedEst
Common.ParameterEstimates.tvalue

Let me know if this helped you.
Klaz
 
Hi Klaz,

thanks but I already tried those options, it must be hidden elsewhere, will contact tech support and post back with the answer.

Cheers
Petr
 
You need to go in and edit the stat.GLM.Estimates template.
This can be found by opening at the results window, then selecting 'templates' from the 'view' menu, and navigating your way through the sashelp.tmplmst to get to that particular template.

Then you can copy the template into the editor window and add the format lines as per code below.

Here is the relevant part code:
Code:
proc template;                                                                
define table Stat.GLM.Estimates;                                           
  [...]                                                                      
    define LowerCL;                                                         
      translate _val_=.M into "   -Infinity";                              
        glue=10;                                                           
        space=1;    
        [COLOR=red]format = 7.3 ;[/color] 
    end;                                                                    
    define UpperCL;                                                         
      translate _val_=.I into "    Infinity";     
      [COLOR=red]format = 7.3 ;[/color]  
    end;                                                                    
  [...]                                                              
end;                                                                       
run;

NOTE: these changes are semi-permanent, every time you run a glm the estimates output will be formated in this way, even if you shutdown and restart SAS.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top