Hello SAS time Series experts,
Following code gives me error about insufficient number observations as minimum is 31 but I only have 29. Unfortunately I will have to wait months to get additional historical data points Are there any additional options to force SAS to run this test with 28 or 29 observations?
/*cointegrating test (Johansen)*/
title1 "Cointegration Test";
proc varmax data=testdata;
model y x1 / dftest cointtest=(johansen);
run;
title1;
Get this error:
Hello,
There is minimum number of observations requirement when the automatic tentative order selection routine is used. It is in this routine that the procedure checks to see if the data set includes the recommended minimum number of observations needed for model selection. This check is based on the number of response variables specified in the model and the range of the order of the VARMA models to consider. Because you did not specify P = or Q = option in the MODEL statement, the procedure uses the automatic tentative order selection routine to select the AR and MA orders, as shown in the note just before the error message you observed:
NOTE: Since both the autoregressive and moving average orders are not specified, the AR and MA
orders are selected by a minimum information criterion.
ERROR: Insufficient number of observations. After any differencing is performed, there are xx
observations and a minimum of xx are required.
If you do not have any more observations available than what you currently have, then you may avoid this error by explicitly specifying P = and/or Q = option in the MODEL statement rather than having the procedure choose the AR and MA orders automatically using the automatic tentative order selection routine. If you do not know the appropriate AR and/or MA order to specify for your model, then you may consider running each of the candidate models you want to consider separately, and compare the Information Criteria and Model Diagnostics across the models yourself in order to select the appropriate AR and MA orders. Please note that 31 observations for an VARMA model is really not a big sample size requirement, so you may want to consider only low order models.
I hope this helps.
Thanks when I set p=1 it works for most of the models I'm testing. But does not work for one and I get the following error. How can I fix this?
title1 "Cointegration Test";
proc varmax data=datasetname;
model y x2 / dftest cointtest=(johansen) p=1;
run;
title1;
ERROR: The matrix is not positive definite when the cointegrated job is processed. The VARMAX procedure stopped processing further
steps.
The error message indicates that non-positive definite matrix is encountered during the cointegrated job process. Such problem is data dependent. In order to further investigate it will be helpful if you can provide your .sas7bdat file which enters your PROC VARMAX step. If you cannot share your data set on the communities, you may open a Technical Support track and send in your data set via the Technical Support track:
https://support.sas.com/en/technical-support.html
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.