BookmarkSubscribeRSS Feed
somebody
Lapis Lazuli | Level 10

I am computing the cross correlation of 2 variables. How do I get the results in a dataset? I had a look at this link I think I have to use CrossCorrGraph but got an error message.

https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_arima_details53.htm&docsetVersion=1...

here is my code:

proc arima data=sample; 
	by permno;
	identify var=r crosscorr=vol_change nlag=10 nomiss;
	ods output cc=CrossCorrGraph;
run;quit;

 

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hi @somebody,

 

The syntax is

ODS OUTPUT output-object-specification=data-set;

i.e., in your example:

ods output CrossCorrGraph=cc;
somebody
Lapis Lazuli | Level 10

I tried that but got the following message:

WARNING: Output 'CrossCorrGraph' 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.

 

FreelanceReinh
Jade | Level 19

This warning message confirms that the syntax of the ODS OUTPUT statement is now correct and indicates that a different issue prevents the creation of the desired table. I'm sorry I don't have a SAS/ETS license nor any experience with this module, so can't help you much with PROC ARIMA. My next steps in the investigation would be:

  1. Is the graph (whose data the ODS table CrossCorrGraph would contain) created at all?
  2. Any other graph (see ODS Graph Names)?
  3. After submitting ods graphics on; ?
  4. Does the procedure output (or other log messages) give any hint about issues with the input dataset?
  5. Temporarily simplify the code: omit the NOMISS option, omit the BY statement or replace it with a WHERE statement restricting the dataset to one of the BY groups.
  6. Use a working example, e.g., from the documentation (Example 7.3 should be suitable) as a basis, add your ODS OUTPUT statement and, once this creates the CrossCorrGraph table, modify the code and the input dataset step by step so as to make it more and more similar to your actual code and data. Then you would see what change stops the creation of that table.

If all the above doesn't help, I recommend that you open a new thread in the SAS Forecasting and Econometrics subforum.

 

Good luck!

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 614 views
  • 0 likes
  • 2 in conversation