HI,
I Want to forecast a mean revert process. The process is as following, y(t) = y(t-1) + a(b-y(t-1)). Here y(t-1) is lagged value for y(t). This is actually an AR(1) process. I have a data set with y value from 1960/01 to 2000/12. I want to use these data to estimate a mean revert (AR(1)) process, then I want to forecast y from 2001/01 for 10 months. How to do this? I searched and found that I can use proc model to estimate this model, but don't know how to forecast. Also I found that I may use proc arima to estimate and forecast, but don't quite know how to.
thanks.
Hello -
In order to use PROC ARIMA (or any other forecasting procedure) you will make to make sure that your data is in time series format - with other words no gaps in the time dimension are allowed. It is ok to have missing values for the analysis variable for not observed periods (such as no value for March in your example), but your variable DATE needs to be modified. You could use the TIMESERIES procedure for example - see for example: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_timeseries_exa....
Yes, you will need to tell the procedure about the periodicity of your data - in the case of the airline data (sashelp.air) the periodicity is monthly. See: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_tsdata_sect029....
In your case ID will need to point to your column DATE and INTERVAL will be month.
CROSSCOR allows you to specify and cross-correlate input series or ARIMAX models. See: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_arima_gettings... for more details.
Thanks,
Udo
Hello -
If you have access to SAS/ETS software you may want to use the ARIMA procedure to model this process.
Here is an example using SASHELP.AIR:
proc arima data=sashelp.air;
identify var=air;
estimate p=1;
forecast id=DATE interval=MONTH lead=12 out=work.forecast;
quit;
Of course AR(1) is not a good model for this data, but you'll get the idea.
You will find many more examples here: http://support.sas.com/rnd/app/examples/ETSexamples.html
Thanks,
Udo
Thank you for your help. In my dataset, I have one variable date showing the date of observations. These dates may not continue. For example, 2001/01, 2001/02, 2001/04, March is missing. But it's ok for me since I will use 2001/02 as the lag of 2001/04. There is no variable month. Do I have to include 'interval=month' in the codes? What is this for? Also, I found some examples using crosscorr= in the code. What is the difference if I change identify part into
identify var=air crosscorr = (date);
Thanks.
Hello -
In order to use PROC ARIMA (or any other forecasting procedure) you will make to make sure that your data is in time series format - with other words no gaps in the time dimension are allowed. It is ok to have missing values for the analysis variable for not observed periods (such as no value for March in your example), but your variable DATE needs to be modified. You could use the TIMESERIES procedure for example - see for example: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_timeseries_exa....
Yes, you will need to tell the procedure about the periodicity of your data - in the case of the airline data (sashelp.air) the periodicity is monthly. See: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_tsdata_sect029....
In your case ID will need to point to your column DATE and INTERVAL will be month.
CROSSCOR allows you to specify and cross-correlate input series or ARIMAX models. See: http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_arima_gettings... for more details.
Thanks,
Udo
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.