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 ?
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 .
ACF is decreasing very slowly, therefore price could not be stationarity.
Difference it .
identify var=price(1)
i see that's the same like:
newprice=price-lag1(price);
It is stationary now, but some prices are negative.
Use SAS syntax (forecast statement), and SAS will take care of it. identify var=price(1); estimate p=2; forecast lead=12
If you want constraint price be positive , Try PROC ESM . Or "Forecasting Log Transformed Data" , check it in PROC ARIMA's documentation.
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
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 .
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.