Page 1 of 1
"positive or non-negative arguement" error from bvar (sznw)
Posted: Wed Aug 07, 2013 11:13 am
by CharlieEVIEWS
Apologies for posting what may be a trivial question, especially given my lack of a strong theoretical knowledge of bvars. In an exercise comparing the various bvar priors (with default settings), I have come across the error:
"positive or non-negative argument to function expected in ..."
from a .bvar(prior=sznw) VAR object. Is this something to do with the residual covariance estimates?
Many thanks as always.
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Wed Aug 07, 2013 11:25 am
by EViews Gareth
Could you post the workfile and exact specification you used?
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Thu Aug 08, 2013 6:12 am
by CharlieEVIEWS
This code shows the error message:
Code: Select all
wfcreate q 1950 2010
series a = nrnd
series b = nrnd
series h = nrnd
series j = nrnd
series e = nrnd
series f = nrnd
series g = nrnd
series y = nrnd
series x = nrnd
series z = nrnd
series m = nrnd
series n =nrnd
var bvartest
smpl 1995q1 2010q4
bvartest.bvar(prior=sznw) 1 1 a b j h e f g y
The source of the error is due to an insufficient number of observations for the number of variables being estimated: if you elongate the sample, or remove variables, the error message disappears. However, I am still confused as to why an error message occurs!
Changing the combination of the variables and sample also seldom gives an error message: "Equation too complex or syntax error in..." Which can also be seen in this example:
Code: Select all
wfcreate q 1990 2010
series a = nrnd
series b = nrnd
series h = nrnd
series j = nrnd
series e = nrnd
series f = nrnd
series g = nrnd
series y = nrnd
series x = nrnd
series z = nrnd
var bvartest
smpl 1990q1 2010q4
bvartest.bvar(prior=sznw) 1 1 a b h d e f g x y z
Do you have any suggestions? Apologies for any naivety on my behalf!
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Thu Aug 08, 2013 8:08 am
by EViews Gareth
We'll fix the first one - you should be able to still estimate the BVAR, but you cannot calculate some of the summary stats if you don't have enough observations. Currently EViews throws out the whole estimation in such cases. We'll fix it so that the estimation goes through, but the summary stats are NAs.
In the second one, you have "D" as a variable. You can't have "D" as a variable in EViews (since it is the difference operator).
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Fri Aug 09, 2013 5:55 am
by CharlieEVIEWS
Ah, how silly of me to overlook the reserved name for the difference operator. Many thanks as always for looking at the first error message and acting upon it, the level of support given through these forums is surely one of the main reasons which makes EViews such a great product!
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Tue Sep 10, 2013 6:14 am
by p@t
Hi
I experience the same error message using a BVAR technique (using Sims-Zha (normal-Wishart) prior) on 4 variables using 6 lags with a sample 1998m1 2005m12 (96 obs) - not sure why it could not be estimated!
And the additional weird thing is that the same code works on a colleague computer without any error! Is it related to a different 'General Option' in Eviews??
You mention a fix to be incorporated: when is it planned to be included in an official build?
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Tue Sep 10, 2013 6:42 am
by EViews Gareth
I believe it has already gone out. What is the build date on the copy in which you are experiencing the error message?
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Tue Sep 10, 2013 9:03 am
by p@t
We are using "Entreprise edition - Aug 1 2013 build".
Re: "positive or non-negative arguement" error from bvar (sz
Posted: Tue Sep 10, 2013 9:08 am
by EViews Gareth
You should update to the latest version.