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