"Missing values in @logl series....."in LSTAR program
Posted: 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
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