BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Edoedoedo
Pyrite | Level 9

Hi, consider this code:

 

 

proc tsmodel data=MYCAS.ZZZ outscalar=MYCAS.AAA;
    id DATE interval=day;
    var VALORE;
    outscalars pvalue rc;
    require tsa;
    submit;
        declare object tsa(tsa);
        rc = tsa.stationaritytest(VALORE,,,,'SSM',pvalue);
        rc = rc;
pvalue = pvalue; endsubmit; run;

I want to calculate the stationarity test pvalue for the time series (attached as csv):

 

EduxEdux_0-1623941528137.png

However in the results I see:

EduxEdux_1-1623941673386.png

so that the pvalue is missing and the return code is 0, which according to the documentation (link) means Time series is stationary with the default significance level of 0.05 which clearly is false here.

 

So what's wrong? Can you help me to figure out what is happening? Moreover, what kind of test is stationaritytest performing? Is unclear from the documentation.

 

Note: I must use only procedures cas-enabled.

 

Thanks

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
imvash
SAS Employee

Your data seems to be weekly, but you put interval=day. That might fix your problem.

View solution in original post

3 REPLIES 3
imvash
SAS Employee

Your data seems to be weekly, but you put interval=day. That might fix your problem.

Edoedoedo
Pyrite | Level 9
Thank you, I completely forgot to check the periodicity, That time series is part of a large set of time series on which perform the stationarity test and I didn't noticed that most of them were daily but some were not.
That explains the calculation failure, thank you very much!
imvash
SAS Employee

Also, the augmented Dickey-Fuller test is used in STATIONARITYTEST method.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Discussion stats
  • 3 replies
  • 1721 views
  • 2 likes
  • 2 in conversation