Im not an expert in SAS, but I am writing my masterthesis and doing a valuation of the CNY/USD exchange rate.
I am currently trying to build a regression with CNY/USD as the dependent variable and some macro economic factors as independent variables. To test for autocorrelation i have used the following code on all of my variables, including the dependent variable:
PROC ARIMA DATA = sas;
IDENTIFY VAR = dCNY_USD;
Attached is the output from the test. As you can see, the output indicates a high level of autocorrelation. It is the same for 7 of my 10 variables. How do I proceed to remove the autocorrelation from my data set?
Hope someone can help me with this problem.
Thanks for your answer. I have also tried the DW test as you suggested, using the following code:
proc autoreg data=sas;
model dCNY_USD = dirdiff infdiff dlogfdicn dlogfxrcn dlogfxrus dlogcacn dpsicn dpsius naus / dw=12 dwprob;
You can see the output attached. I used 12th order, as it is monthly data. Are you then suppose to check all the orders for an indication of autocorelation, or just the 12th? Also, as you can see from the output, this test suggests no autocorrelation on first order, while the initial test I did, which I attached in the first post, shows a strong indication of autocorrelation. And so it did for 7 out of my 10 variables. Do you know why the two tests gives so different answers?
I am very greatful for your help.
using difference the time series,
the first difference is :
IDENTIFY VAR = dCNY_USD(1);
if it is still correlation,try second difference,
IDENTIFY VAR = dCNY_USD(2);
Or you could let SAS do it for you automatically.
identify var=dCNY_USD esacf p=(0:7) q=(0:8);
Thanks for your answer. I`ve tried your solution, and I have to take 7 or 8 differences for the p-value to start moving up towards 1%. And by using the Durbin-Watson test, it shows no obvious autocorrelation in the regression. I can´t understand why the two tests gives such different answers. Also, how come you can check for autocorrelation on all variables at once in the DW-test, but with the test you suggested, you have to check one variable at the time.
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.