"Missing values in @logl series....."in LSTAR program

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

tony
Posts: 59
Joined: Wed Jan 07, 2009 7:59 am

"Missing values in @logl series....."in LSTAR program

Postby tony » Sat Mar 27, 2010 11:23 pm

when i run the LSTAR model code,it saids"Missing values in @logl series at current coefficients at observation 1960Q2 in "Do_LL1.ml"
Can anyone direct me to a document that would explain what causes this error?My program is attached below.
' LSTAR
'change path to program path
%path = @runpath
cd %path

' load workfile
load m
series y

' declare coef vectors to use in LSTAR likelihood
coef(1) a0
coef(1) a1
coef(1) b0
coef(1) b1
coef(1) gamma
coef(1) var
' get starting values from AR(1)
equation eq_temp.ls y c ar(1)
a0(1) = eq_temp.c(1)
a1(1) = eq_temp.c(2)
b0(1) =1
b1(1)=1
gamma(1)=300
var(1)=eq_temp.@se^2

' set presample values of expressions in logl
smpl @first @first
series sima2=var(1)
series res=y-a0(1)-b0(1)

' set up LSTAR likelihood

logl ll1
ll1.append @logl logl

ll1.append epi= a0(1)+a1(1)*y(-1)+(b0(1)+b1(1)*y(-1))/(1+exp(-gamma(1)*y(-1)))
ll1.append res = y-epi
ll1.append sigma2 =var(1)
ll1.append z = res/@sqrt(sigma2)
ll1.append logl = log(@dnorm(z)) - log(sigma2)/2


' estimate and display results
smpl @first+1 @last
ll1.ml(showopts, m=1000, c=1e-5)
show ll1.output

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

Re: "Missing values in @logl series....."in LSTAR program

Postby EViews Gareth » Mon Mar 29, 2010 11:17 am

That basically means at the current coefficient values, the @logl series in the likelihood object contains NAs. This could be (and is often due to) coefficient values that give the log of a negative number, or raising a number to a negative power.

It might be that this is true at the starting values you provided, or it might be that during the estimation process, the optimiser wandered into such an area.

Either way the best solution is to provide different starting values and see if that helps the issue.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests