divide by zero when computing absolute value

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

divide by zero when computing absolute value

Postby maxchen » Fri Jul 31, 2015 11:48 pm

Code: Select all

'2015-08-01 14:18 'EV9 20150728 setmaxerrs 5 pageload tstats.txt genr di = 0 di(2) = 1 logl LLn LLn.append @logl L LLn.append e = R -c(1) LLn.append h = @recode(di, @var(R), exp(c(2)) +exp(c(3))*e(-1)^2 +exp(c(4))*h(-1)) LLn.append z = e/@sqrt(h) LLn.append L = log(@dnorm(z)) - log(h)/2 c = 0 ' c(1) = 0.01 ' c(2) = log(8E-05) ' c(3) = -1 ' c(4) = 0.5 smpl @first+1 @last LLn.ml '(showopts) ' !ccc0 = exp(c(2)) +exp(c(3))*@elem(e,%date)^2 + exp(c(4))*@elem(h,%date) ' vector(4) ve = abs(LLn.@stderrs) vector(4) vs = LLn.@tstats ' vector(4) vs = abs(LLn.@tstats) %date = @word(LLn.@smpl,2) !ccc0 = exp(c(2)*(vs(2)>2)) +exp(c(3)*(vs(3)>2))*@elem(e,%date)^2 + exp(c(4)*(vs(4)>2))*@elem(h,%date)
tstats.txt
data file
(1.97 KiB) Downloaded 362 times
the errors are
Division by zero in "VECTOR(4) VS = LLN.@TSTATS".
VS is not defined in "!CCC0 = EXP(C(2)*(VS(2)>2)) +EXP(C(3)*(VS(3)>2))*@ELEM(E,"2006M03")^2 + EXP(C(4)*(VS(4)>2))*@ELEM(H,"2006M03")".

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests