Hi All,
I am trying to change the decimals for proc genmod but I am not able to get the template statement to work.
Can someone explain why this won't work. Thanks in advance!
ODS TRACE
Output Added:
-------------
Name: ParameterEstimates
Label: Analysis Of Parameter Estimates
Template: stat.genmod.parameterestimates
Path: Genmod.ParameterEstimates
-------------
NOTE: The scale parameter was held fixed.
Output Added:
-------------
Name: Estimates
Label: ESTIMATE Statement Results
Template: stat.genmod.estimates
Path: Genmod.Estimates
-------------
CODE
proc template;
edit Stat.Genmod.ParameterEstimates;
define Estimate;
format = 8.7; end;
define StdErr;
format=8.7; end;
define LowerWaldCL;
format = 8.7; end;
define UpperWaldCL; format = 8.7; end;
end; run;
proc template;
edit stat.genmod.estimates;
define Estimate;
format = 8.7;
end;
define StdErr;
format= 8.7;
end;
define LowerCL;
format = 8.7;
end;
define UpperCL;
format = 8.7;
end;
end;
run;
LOG ERRORS
This worked
907 proc template;
908 edit Stat.Genmod.ParameterEstimates;
909 define Estimate
909! ;
NOTE: Updating previous DEFINE: Estimate.
910 format = 8.7; end;
911 define StdErr
911! ;
NOTE: Updating previous DEFINE: StdErr.
912 format=8.7; end;
913 define LowerWaldCL
913! ;
NOTE: Updating previous DEFINE: LowerWaldCL.
914 format = 8.7; end;
915 define UpperWaldCL
915! ; format = 8.7; end;
NOTE: Updating previous DEFINE: UpperWaldCL.
916 end; run;
NOTE: Overwriting existing template/link: Stat.Genmod.ParameterEstimates
NOTE: TABLE 'Stat.Genmod.ParameterEstimates' has been saved to: SASUSER.TEMPLAT
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
This does not work
proc template;
920 edit stat.genmod.estimates;
921 define Estimate
921! ;
ERROR: Unknown symbol: 'Estimate'
922 format = 8.7;
923 end;
WARNING: Object will not be saved.
924 define StdErr;
-
22
76
925 format= 8.7;
------
180
ERROR 22-322: Expecting a name.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 180-322: Statement is not valid or it is used out of proper order.
926 end;
WARNING: No template to store. Possible mismatched END statement.
927 define LowerCL;
-
22
76
928 format = 8.7;
------
180
ERROR 22-322: Expecting a name.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 180-322: Statement is not valid or it is used out of proper order.
929 end;
WARNING: No template to store. Possible mismatched END statement.
930 define UpperCL;
-
22
76
931 format = 8.7;
------
180
ERROR 22-322: Expecting a name.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 180-322: Statement is not valid or it is used out of proper order.
932 end;
WARNING: No template to store. Possible mismatched END statement.
933 end;
WARNING: No template to store. Possible mismatched END statement.
934 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds
WARNING: Errors were produced.
NOTE: The SAS System stopped processing this step because of errors.
First did you have something similar to
ods path sasuser.templat(update) sashelp.tmplmst(read);
Otherwise you may be trying to edit the version in SASHELP which you likely shouldn't try to edit.
second, you may need the reference to the parent verison or use edit instead of define
and 8.7 doesn't leave any room for an integer portion so may want 9.7 -> 0.1234567 needs 9 spaces.
and possibly use EDIT instead of define.
EDIT Estimate;
format = 9.7;
parent = Common.ParameterEstimates.Estimate;
end;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.