11-06-2013 12:08 PM
I do not know a lot about coding in Base SAS and someone provided me with this code, but it is returning an error. It says "Expecting an =."
I am attempting to do a simple Granger causality test between corn and soybean prices and compare prior to 2000 results to post 2000 results. dcorn is just corn price multiplied by a dummy for year>2000. I am not sure why SAS will not accept ar(1,1,1)+xl(1,1,1)=0;
Any ideas? Thanks.
Here is the relevant code:
model corn soybeans = dcorn dsoybeans/
p=2 xlag=(1,2) lagmax=12 minic=(p=20 q=0) print=(diagnose);
test ar(1,1,1)+xl(1,1,1)=0, ar(2,1,1)+xl(2,1,1)=0;
11-06-2013 02:57 PM
Only one idea, and it is a stab in the dark. The usual syntax for the TEST and RESTRICT statements looks like parameter=value, and I don't think the sum of two parameters, such as you give, is allowed. As a work around, you might get the estimates and the covariance matrix of the estimates and construct asymptotic tests in a data step.