Proc varmax, Test statement question

New Contributor
Posts: 2

Proc varmax, Test statement question

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:

proc varmax;

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;

Respected Advisor
Posts: 2,655

Re: Proc varmax, Test statement question

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.

Steve Denham

New Contributor
Posts: 2

Re: Proc varmax, Test statement question

Posted in reply to SteveDenham

Thanks.  I was wondering if that was the issue, but I was trying to be optimistic and hope that it could be done that way.

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation