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-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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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