Is there a way to tell SAS to create a data set with the data used to create graphs in PROC steps?
For example, in PROC VARMAX, the procedure produces a "Prediction Error Diagnostics Plot" which shows the ACF, PACF and IACF. I would like to save the data that produced those graphs into a SAS data set to create them in Excel.
Thanks.
Yes! Most of the time at least.
You run the proc, with ODS TRACE ON before and after, find the graph name and save that as an output data set.
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html
Here's an example for a different plot, I couldn't find the specific one you mentioned in the output so you likely are specifying an option somewhere. Table Names are also listed here: https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_varmax_details85.htm&docsetVersion=...
Line in red captures the data for the error distribution plot.
ods output ErrorDistribution = myGraphData; proc varmax data=sashelp.workers plot(unpack)=(residual model forecasts); id date interval=month; model electric masonry / dify=(1,12) noint p=1; output lead=12; run;
@Kevin_L_ wrote:
Is there a way to tell SAS to create a data set with the data used to create graphs in PROC steps?
For example, in PROC VARMAX, the procedure produces a "Prediction Error Diagnostics Plot" which shows the ACF, PACF and IACF. I would like to save the data that produced those graphs into a SAS data set to create them in Excel.
Thanks.
Yes! Most of the time at least.
You run the proc, with ODS TRACE ON before and after, find the graph name and save that as an output data set.
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html
Here's an example for a different plot, I couldn't find the specific one you mentioned in the output so you likely are specifying an option somewhere. Table Names are also listed here: https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_varmax_details85.htm&docsetVersion=...
Line in red captures the data for the error distribution plot.
ods output ErrorDistribution = myGraphData; proc varmax data=sashelp.workers plot(unpack)=(residual model forecasts); id date interval=month; model electric masonry / dify=(1,12) noint p=1; output lead=12; run;
@Kevin_L_ wrote:
Is there a way to tell SAS to create a data set with the data used to create graphs in PROC steps?
For example, in PROC VARMAX, the procedure produces a "Prediction Error Diagnostics Plot" which shows the ACF, PACF and IACF. I would like to save the data that produced those graphs into a SAS data set to create them in Excel.
Thanks.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.