DATA Step, Macro, Functions and more

Character date to numeric date & ACF plot

Accepted Solution Solved
Reply
Contributor
Posts: 49
Accepted Solution

Character date to numeric date & ACF plot

Hi I'm plotting the ACF of CAD with the following data example:

Data.png

However, the log gave the following error:

Log.png

So I guess the problem is my date is not numeric? If so, can someone provide some hint with this problem? Thank you.

Here is the code I wrote for ACF plot:

proc autoreg DATA=Combined
plots(unpackpanel only) = ACFPlot;
model CAD = Date;
run;

Accepted Solutions
Solution
‎04-24-2017 11:11 AM
Frequent Contributor
Posts: 93

Re: Character date to numeric date & ACF plot

Have you tried adding the class statement prior to the model statement?  Could be that SAS wants to look at your data categorically.

 

CLASS Date;

Also, what is the informat and format of your data?

View solution in original post


All Replies
Solution
‎04-24-2017 11:11 AM
Frequent Contributor
Posts: 93

Re: Character date to numeric date & ACF plot

Have you tried adding the class statement prior to the model statement?  Could be that SAS wants to look at your data categorically.

 

CLASS Date;

Also, what is the informat and format of your data?

Contributor
Posts: 49

Re: Character date to numeric date & ACF plot

Posted in reply to thomp7050

Thank you for replying, I double checked the format part and fixed it by correcting a mistake. Thank you.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 132 views
  • 0 likes
  • 2 in conversation