"positive or non-negative arguement" error from bvar (sznw)

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

"positive or non-negative arguement" error from bvar (sznw)

Postby CharlieEVIEWS » Wed Aug 07, 2013 11:13 am

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.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: "positive or non-negative arguement" error from bvar (sz

Postby EViews Gareth » Wed Aug 07, 2013 11:25 am

Could you post the workfile and exact specification you used?

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: "positive or non-negative arguement" error from bvar (sz

Postby CharlieEVIEWS » Thu Aug 08, 2013 6:12 am

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: "positive or non-negative arguement" error from bvar (sz

Postby EViews Gareth » Thu Aug 08, 2013 8:08 am

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).

CharlieEVIEWS
Posts: 202
Joined: Tue Jul 17, 2012 9:47 am

Re: "positive or non-negative arguement" error from bvar (sz

Postby CharlieEVIEWS » Fri Aug 09, 2013 5:55 am

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!

p@t
Posts: 2
Joined: Tue Sep 10, 2013 5:38 am

Re: "positive or non-negative arguement" error from bvar (sz

Postby p@t » Tue Sep 10, 2013 6:14 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: "positive or non-negative arguement" error from bvar (sz

Postby EViews Gareth » Tue Sep 10, 2013 6:42 am

I believe it has already gone out. What is the build date on the copy in which you are experiencing the error message?

p@t
Posts: 2
Joined: Tue Sep 10, 2013 5:38 am

Re: "positive or non-negative arguement" error from bvar (sz

Postby p@t » Tue Sep 10, 2013 9:03 am

We are using "Entreprise edition - Aug 1 2013 build".

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: "positive or non-negative arguement" error from bvar (sz

Postby EViews Gareth » Tue Sep 10, 2013 9:08 am

You should update to the latest version.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests