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

I have a time series with prices.  And i need to check if it stationary or not ?And if not, i need to make it stationary.

 

So i think, i have to do a Dickey Fuller test.

 

So i tried this code

proc ARIMA data=prices;
identify var=price stationarity=(adf=(0)) ;
run;

 

Is it correct ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Sorry . mislead you.

 

newprice=price-lag1(price);

 

are supposed to get negative value like -0.0568, -0.2654.

if you put model on newprice ,you will get difference of price 's forecast,

therefore suggest you to use PROC ARIMA syntax, not calculated it by hand .

View solution in original post

6 REPLIES 6
Ksharp
Super User

ACF is decreasing very slowly, therefore price could not be stationarity.

Difference it .

 

identify var=price(1)
Pelox
Fluorite | Level 6

i see that's the same like:

newprice=price-lag1(price);

 

It is stationary now, but some prices are negative.

Ksharp
Super User
Use SAS syntax (forecast statement), and SAS will take care of it.

identify var=price(1);
estimate p=2;
forecast lead=12 


Ksharp
Super User
If you want constraint price be positive , Try PROC ESM .

Or "Forecasting Log Transformed Data" , check it in PROC ARIMA's documentation.


Pelox
Fluorite | Level 6

I have very small variables. It's gas prices.

So after difference i get for example some prices like -0.0568, -0.2654

I tried this

data new;
set newprices;
ylog = log( newprices );
run;

But  after this i get :

-2.356,-2.0325  etc.

 

i don't understand

Ksharp
Super User

Sorry . mislead you.

 

newprice=price-lag1(price);

 

are supposed to get negative value like -0.0568, -0.2654.

if you put model on newprice ,you will get difference of price 's forecast,

therefore suggest you to use PROC ARIMA syntax, not calculated it by hand .

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 6 replies
  • 1194 views
  • 2 likes
  • 2 in conversation