BookmarkSubscribeRSS Feed
DipeshGupta
Calcite | Level 5

I was trying to change the format of the ODS Table (ParameterEstimates) of HPGenselect but no success.

I tried using Proc Tabulate but nothing works.

 

I tried this.

 

proc template;
edit HPSTAT.HPGenselect.ParameterEstimates ;
edit Estimate; format=Best32.; end;
edit StdErr; format=Best32.; end;
edit Effect ; format = $200. ; end ;
end;
run;

 

Then changed the first edit statement with the Source statement.

 

proc template;
Source HPSTAT.HPGenselect.ParameterEstimates ;
edit Estimate; format=Best32.; end;
edit StdErr; format=Best32.; end;
edit Effect ; format = $200. ; end ;
end;
run;

 

Then also added Path in this code.

 

proc template;
path "Hpgenselect.ParameterEstimates" ;
Source HPSTAT.HPGenselect.ParameterEstimates ;
edit Estimate; format=Best32.; end;
edit StdErr; format=Best32.; end;
edit Effect ; format = $200. ; end ;
end;
run;

 

But nothing works.

 

Can someone help me with this..??

13 REPLIES 13
WarrenKuhfeld
Rhodochrosite | Level 12

Make sure you are not editing versions that you incorrectly edited before.  Start by deleting any version that happens to be in sasuser. Then list the versions that exist.  You should see only one template in the table and it should come from sashelp.  If there is more than one, delete any that do not come from sashelp.  Then try editing again.

 

proc template;
delete HPSTAT.HPGenselect.ParameterEstimates / store=sasuser.templat;
list HPSTAT.HPGenselect.ParameterEstimates ;
edit HPSTAT.HPGenselect.ParameterEstimates ;
edit Estimate; format=Best32.; end;
edit StdErr; format=Best32.; end;
edit Effect ; format = $200. ; end ;
end;
source HPSTAT.HPGenselect.ParameterEstimates ;
run;

Reeza
Super User

What's your ultimate objective with editing the template, what changes are you trying to implement?

DipeshGupta
Calcite | Level 5

@Reeza I want to change the format of column Effect because it is not showing the complete parameter name.

 

If I have Apple*Banana*Grapes then it is only giving me App*Bana*Grap

 

But I want the complete name of all the parameters.\

 

@WarrenKuhfeld I am getting an error msg :

 

291 proc template;
292 delete HPSTAT.HPGenselect.ParameterEstimates /
292 ! store=sasuser.templat;
ERROR: Write access to member SASUSER.TEMPLAT.ITEMSTOR is
denied.
NOTE: Could not delete 'HPSTAT.HPGenselect.ParameterEstimates'
from template store!
293 list HPSTAT.HPGenselect.ParameterEstimates ;
294 edit HPSTAT.HPGenselect.ParameterEstimates ;
31 The SAS System
09:25 Monday, September 4, 2017

295 edit Estimate; format=Best32.; end;
296 edit StdErr; format=Best32.; end;
297 edit Effect ; format = $200. ; end ;
298 end;

PGStats
Opal | Level 21

ParameterEstimates is a fairly simple table. It might be easier to do your own reporting. Starting from an example from the HPGENSELECT documentation:

 


proc hpgenselect data=getStarted;
   class C1-C5;
   model Y = C1-C5 / Distribution=Poisson;
   selection method=forward details=all;
   ods output parameterestimates=pe;
run;

title;
option nodate nonumber;
ods rtf file="&sasforum.\reports\hpgenselectParameters.rtf" style=journal;
proc sql;
select 
    parameter,
    df,
    estimate,
    stdErr,
    ChiSq format=6.2,
    ProbChiSq
from pe;
quit;

ods rtf close;
PG
DipeshGupta
Calcite | Level 5

@PGStats Which address to we need to give at the place of &sasforums.

 

Where does the reports get stored on SAS..??

I don't have any idea about that. 

Please help.

PGStats
Opal | Level 21

The example produces output to the results window and to a RTF file. You can simply remove the ODS RTF statements if you don't need that. The file="" option must state a full reachable path on your system.

PG
DipeshGupta
Calcite | Level 5

@But where is the report file of parameterestimates created by hpgenselect is stored.

 

How to identify the path of the report file created by hpgenselect..?? 

PGStats
Opal | Level 21

On my system, reports are sent to the results window, not to a file. To get the reports into a file, I must specify an ODS destination, such as the RTF destination in my example. Your system might have a different configuration.

 

You should get familiar with the output delivery system (ODS) before attempting to modify templates.

PG
Reeza
Super User

You specified the path of the RTF file in the FILE option on the ODS RTF statement. Or the log will say the location.

DipeshGupta
Calcite | Level 5

I got this is the log.,

 

Name: ParameterEstimates
The SAS System

Label: Parameter Estimates
Template: HPSTAT.HPGenselect.ParameterEstimates
Path: Hpgenselect.ParameterEstimates

 

and then I used this path in the code but again ended up in error,

 

title;
option nodate nonumber;
ods rtf file="Hpgenselect.ParameterEstimates\reports\hpgenselectParameters.rtf" style=journal;
proc sql;
select
Effect format=$2000.,
parameter,
df,
estimate,
stdErr,
ChiSq,
ProbChiSq
from Model.InteractionChart ;
quit;

ods rtf close;

 

 

 

Error

 

ERROR: Physical file does not exist,
D:\sasconf\Config\Lev1\SASApp\Hpgenselect.ParameterEstima
tes\reports\hpgenselectParameters.rtf.
ERROR: Fatal ODS error has occurred. Unable to continue
processing this output destination.

PGStats
Opal | Level 21

It looks like the following destination should at least exist on your system

 

file="D:\sasconf\Config\Lev1\SASApp\hpgenselectParameters.rtf"

PG
DipeshGupta
Calcite | Level 5

proc template;
delete HPSTAT.HPGenselect.ParameterEstimates / store=Model.templat;
list HPSTAT.HPGenselect.ParameterEstimates ;
edit HPSTAT.HPGenselect.ParameterEstimates ;
edit Estimate; format=Best32.; end;
edit StdErr; format=Best32.; end;
edit Effect ; format = $200. ; end ;
end;
source HPSTAT.HPGenselect.ParameterEstimates ;
run;

 

 

This code ran successfully without any errors but the format of the output didn't change.

What to do..??

WarrenKuhfeld
Rhodochrosite | Level 12

https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_ods_sect006...

http://go.documentation.sas.com/?docsetId=statug&docsetTarget=statug_ods_examples02.htm&docsetVersio...

 

It might be that sasuser is not the default template store for you.  Defaults do vary by site.  Use the ods path and ods trace statements to find out where templates are coming from and where the one you are modifying is going to.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 13 replies
  • 1687 views
  • 0 likes
  • 4 in conversation