Hi
I am making Time series Arima model in SAS Guide. I have two columns and need to make a line graph. Two variables should be in the horizontal axis
Below is the line graph which I manually made in excel.
I want to make it in SAS
Below is my two variables
Please advise
Hi Chris
This is my mistake. I'm unable to get correct coding.
I am running the below ARIMA model
/* Creating ARIMA Model for forecast data */ proc arima data=tsforecast; identify var=nyse; estimate p=1 q=1 ; forecast out=forecasted2; run;
I am getting the below output data and stored in forecasted2.
Now I am confused how to take the first two coulmn NYSE forecast and apply into your coding for getting time series plot. Sorry I am not clear in my earlier post. You have created new data "have" and applied into the SG plot. Could you please guide me how to this with my above output data? Sorry for the inconvinience.
Here are two ways:
data HAVE;
do X=1 to 200;
A+ranuni(1)-.5;
B+ranuni(1)-.5;
output;
end;
run;
proc sgplot data=HAVE;
series X=X Y=A;
series X=X Y=B;
refline 0;
run;
symbol i=j;
proc gplot data=HAVE;
plot (A B)*X / overlay vref=0;
run;
quit;
Please look up the different options available for the different procedures to tweak the appearance if the default results above are not suitable.
Hi Chris
Thanks for your solution. I tried it's not working for me.
I am running the ARIMA model and my output data has 5 columns. Among these 5, I have two columns NYSE, FORECAST which I need to do time series plot.
I tried to allocate these two columns in the graph but not successful.
Any suggestions? I think I am not doing right or may not understand the subject.
Cheers,
Dhilip
Not too sure what's unclear in my post, or even less sure of what you tried.
What about:
plot (NYSE FORECAST)*TIME / overlay vref=0;
Hi Chris
This is my mistake. I'm unable to get correct coding.
I am running the below ARIMA model
/* Creating ARIMA Model for forecast data */ proc arima data=tsforecast; identify var=nyse; estimate p=1 q=1 ; forecast out=forecasted2; run;
I am getting the below output data and stored in forecasted2.
Now I am confused how to take the first two coulmn NYSE forecast and apply into your coding for getting time series plot. Sorry I am not clear in my earlier post. You have created new data "have" and applied into the SG plot. Could you please guide me how to this with my above output data? Sorry for the inconvinience.
Where is your time variable?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.