Dear All,
I am trying to write ods output PostSummaries in PROC MCMC, but I get the same error on and on (copied below), eventhough there is not any NOPRINT option. I've already tried to add a 'quit' before the ods command and write the ods commans at the begining of the PROC MCMC statement but it doesn't work.
ERROR I GET:
Output 'PostSummaries' was not created. Make sure that the output object name, label,
or path is spelled correctly. Also, verify that the appropriate procedure options are used
to produce the requested output object. For example, verify that the NOPRINT option is not
used.
PART OF THE CODE:
PROC MCMC data=Libname.data seed=17 nmc=100000;
parm betas COR {.10 .10 .05};
prior COR ~ mvn(mu3, Sig_c);
prior betas ~ mvn(mu2, Sigma2);
model data ~ mvn(betas, Sig_Def);
ods output PostSummaries=parameters;
run;
Any suggestion will be highly appreciated.
Thanks
Belén
Hi:
If you look at the documentation for PROC MCMC, it seems to indicate that you only get the PostSummaries object created if you ALSO use the option STATISTICS=SUMMARY, as described on this documentation page:
You can always use ODS TRACE ON before your PROC MCMC to see what output objects are created, but I think it's a matter of using the right option to turn on the creation of the output object.
cynthia
If you run the code without the ODS output do you get parameters in the displayed output?
Hello Belén,
As ballardw has alluded to, you probably didn't obtain that summary table in the displayed output either.
The error message includes an important hint: "verify that the appropriate procedure options are used to produce the requested output object." To do so, you look up your desired ODS table name (here: PostSummaries) in the table ODS Table Names of the respective procedure. There you see in column "Statement or Option" that PostSummaries is requested by the option STATISTICS=SUMMARY (of the PROC MCMC statement). Since you didn't specify this option, the ODS table was not produced.
In general, you find the link to the list of ODS table names under the "Details" tab in the procedure documentation, mostly close to the bottom of the drop down list.
Thannk you very much! You were right 🙂
Hi:
If you look at the documentation for PROC MCMC, it seems to indicate that you only get the PostSummaries object created if you ALSO use the option STATISTICS=SUMMARY, as described on this documentation page:
You can always use ODS TRACE ON before your PROC MCMC to see what output objects are created, but I think it's a matter of using the right option to turn on the creation of the output object.
cynthia
Thank you very very much to everyone!!! In fact, finally it was a matter of adding "STATISTICS=SUMMARY" in the first line of the command, so now I can save the results in a nother dataset!
Thanks again,
Belén
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.