Avoiding spurious"division by zero" messages

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

jlbrillet
Posts: 39
Joined: Mon Feb 16, 2009 6:03 am

Avoiding spurious"division by zero" messages

Postby jlbrillet » Thu Jun 14, 2012 4:23 am

How to avoid the "divide by zero" when computing the relative error on a null variable.

In the economic domain, no variable is null by chance. The relative variation on a null variable should be considered as zero, but for Eviews any division by zero fails with an annoying and maybe misleading error message.

Avoiding this problem is very simple.

replace the element in the denominator by :

(variable + (variable=0))

If the variable is 0 (with zero variations) you get 0/(0+1) = 0
If the variable is not, the condition gives zero and the additional term has no impact.

Return to “Models”

Who is online

Users browsing this forum: No registered users and 2 guests