## State Space Error Improving Likehood

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### State Space Error Improving Likehood

Hello Again,
I'm using this post and not create a new one. I already sove the problem if the covariance Matrix. I changed the Initial Values and I was able to get convergence. The problem is now, I get the following message: "error to improve log-likelodd". How can I solve this? I already tighted the parameters to 1e-6 and still get the error.

Please, I hope this time I get someone that can help.

Hello, I'm trying to estimate a state space model (trying to replicate the Diebold, Rudebusch & Aruoba (2006)) :
y_t = factors_t*lambda + error-> signal equation
factors_t = X*factors_(t-1) + error -> state equation (VAR(1))

I get the following error: "WARNING: Singular covariance - coefficients are not unique"

I do Belief I get the error because the last 3 latent factors on the vector of factors are mutiplied by zero in the signal equation, i.e., they only are inserted in the state equation in the Vector Autoregressive of lag 1.

I get the vec0 and var0 by estimate first the 3 latent factors without the last 3 (the last three are observable, but I insert as latent in the equation) and then do a VAR(1) to get the covariance matrix and use the mean of the 6 variables for the vec0.

I do post where the workingfile if someone can give it a look and help me. It would be extremely appreciated.

Code: Select all

`@signal y_3    =sv1+(   ( 1-exp(-c(72)*3) )  / (c(72)*3)  )*sv2+(  (  ( 1-exp(-c(72)*3)  ) / (c(72)*3)  ) - ( exp(-c(72)*3) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_3]@signal y_12    =sv1+(   ( 1-exp(-c(72)*12) )  / (c(72)*12)  )*sv2+(  (  ( 1-exp(-c(72)*12)  ) / (c(72)*12)  ) - ( exp(-c(72)*12) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_12]@signal y_24  =sv1+(   ( 1-exp(-c(72)*24) )  /  (c(72)*24)  )*sv2+(  (  ( 1-exp(-c(72)*24)  ) / (c(72)*24)  ) - ( exp(-c(72)*24) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_24]@signal y_36  =sv1+(   ( 1-exp(-c(72)*36) )  /  (c(72)*36)  )*sv2+(  (  ( 1-exp(-c(72)*36)  ) / (c(72)*36)  ) - ( exp(-c(72)*36) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_36]@signal y_60  =sv1+(   ( 1-exp(-c(72)*60) )  /  (c(72)*60)  )*sv2+(  (  ( 1-exp(-c(72)*60)  ) / (c(72)*60)  ) - ( exp(-c(72)*60) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_60]@signal y_84  =sv1+(   ( 1-exp(-c(72)*84) )  /  (c(72)*84)  )*sv2+(  (  ( 1-exp(-c(72)*84)  ) / (c(72)*84)  ) - ( exp(-c(72)*84) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_84]@signal y_120=sv1+(   ( 1-exp(-c(72)*120) )  /  (c(72)*120)  )*sv2+(  (  ( 1-exp(-c(72)*120)  ) / (c(72)*120)  ) - ( exp(-c(72)*120) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_120]@signal y_360=sv1+(   ( 1-exp(-c(72)*360) )  /  (c(72)*360)  )*sv2+(  (  ( 1-exp(-c(72)*360)  ) / (c(72)*360)  ) - ( exp(-c(72)*360) )   )*sv3 + (0)*sv4 + (0)*sv5 + (0)*sv6+[ename=e_360]@state sv1 = c(37) + c(1)*( sv1(-1) - c(37) ) + c(2)*( sv2(-1) - c(38) ) + c(3)*( sv3(-1) - c(39) ) + c(4)*(sv4(-1) - c(40)) + c(5)*(sv5(-1) - c(41)) +  c(6)*(sv6(-1) - c(42)) +  [ename=ni_l]@state sv2 = c(38) + c(7)*( sv1(-1) - c(37) ) + c(8)*( sv2(-1) - c(38) ) + c(9)*( sv3(-1) - c(39) ) + c(10)*(sv4(-1) - c(40)) + c(11)*(sv5(-1) - c(41)) + c(12)*(sv6(-1) - c(42))   + [ename=ni_s]@state sv3 = c(39) + c(13)*( sv1(-1) - c(37) ) + c(14)*( sv2(-1) - c(38) ) + c(15)*( sv3(-1) - c(39) ) + c(16)*(sv4(-1) - c(40)) + c(17)*(sv5(-1) - c(41)) + c(18)*(sv6(-1) - c(42))  + [ename=ni_c]@state sv4 = c(40) + c(19)*( sv1(-1) - c(37) ) + c(20)*( sv2(-1) - c(38) ) + c(21)*( sv3(-1) - c(39) ) + c(22)*(sv4(-1) - c(40)) + c(23)*(sv5(-1) - c(41)) + c(24)*(sv6(-1) - c(42))  + [ename=ni_sv4]@state sv5 = c(41) + c(25)*( sv1(-1) - c(37) ) + c(26)*( sv2(-1) - c(38) ) + c(27)*( sv3(-1) - c(39) ) + c(28)*(sv4(-1) - c(40)) + c(29)*(sv5(-1) - c(41)) + c(30)*(sv6(-1) - c(42))  + [ename=ni_sv5]@state sv6 = c(42) + c(31)*( sv1(-1) - c(37) ) + c(32)*( sv2(-1) - c(38) ) + c(33)*( sv3(-1) - c(39) ) + c(34)*(sv4(-1) - c(40)) + c(35)*(sv5(-1) - c(41)) + c(36)*(sv6(-1) - c(42))  + [ename=ni_sv6]@evar var(ni_l)=exp(c(43))@evar var(ni_s)=exp(c(44))@evar var(ni_c)=exp(c(45))@evar var(ni_sv4)=exp(c(46))@evar var(ni_sv5)=exp(c(47))@evar var(ni_sv6)=exp(c(48))@evar cov(ni_l,ni_s)=c(49)@evar cov(ni_l,ni_c)=c(50)@evar cov(ni_l,ni_sv4)=c(51)@evar cov(ni_l,ni_sv5)=c(52)@evar cov(ni_l,ni_sv6)=c(53)@evar cov(ni_s,ni_c)=c(54)@evar cov(ni_s,ni_sv4)=c(55)@evar cov(ni_s,ni_sv5)=c(56)@evar cov(ni_s,ni_sv6)=c(57)@evar cov(ni_c,ni_sv4)=c(58)@evar cov(ni_c,ni_sv5)=c(59)@evar cov(ni_c,ni_sv6)=c(60)@evar cov(ni_sv4,ni_sv5)=c(61)@evar cov(ni_sv4,ni_sv6)=c(62)@evar cov(ni_sv5,ni_sv6)=c(63)@evar var(e_3)=exp(c(64))@evar var(e_12)=exp(c(65))@evar var(e_24)=exp(c(66))@evar var(e_36)=exp(c(67))@evar var(e_60)=exp(c(68))@evar var(e_84)=exp(c(69))@evar var(e_120)=exp(c(70))@evar var(e_360)=exp(c(71))@mprior svec0@vprior svar0`
Attachments
diebold_yields.wf1
Last edited by pvestia on Thu May 03, 2018 4:44 am, edited 2 times in total.

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error on covariance Matrix

How the Eviews can't estimate the equation?
I read the paper of the DRA model, over and over. And seems my specification is correct.
So why I get the Warning message? Is it because 3 of the latent factors don't intervene on the signal function?

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error Improving Likehood

please? anyone? I really don't see any error in my specification. and my log-likehood is failing to improve.

startz
Non-normality and collinearity are NOT problems!
Posts: 3573
Joined: Wed Sep 17, 2008 2:25 pm

### Re: State Space Error Improving Likehood

Sometimes nonlinear models are hard to estimate. Try different starting values.

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error Improving Likehood

startz wrote:Sometimes nonlinear models are hard to estimate. Try different starting values.

So the difficulty of this model is it because is non-linear on the parameter c(72)?

startz
Non-normality and collinearity are NOT problems!
Posts: 3573
Joined: Wed Sep 17, 2008 2:25 pm

### Re: State Space Error Improving Likehood

Maybe. But state space models are generally nonlinear in that they don't have closed form solutions, so a search algorithm is necessary.

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error Improving Likehood

startz wrote:Maybe. But state space models are generally nonlinear in that they don't have closed form solutions, so a search algorithm is necessary.

Startz,
I estimated the model without the parameter c(72), i.e., I used the value obtained with the yields only model (model where the signals is only the yields and the latent factors are only the ones in the yields equation)

The model finally converged, but comparing the critieria (likehood, BIC, AIC) is extremely worst than the model without the macro variables, cu, cpi and fed.

Any Idea why?

startz
Non-normality and collinearity are NOT problems!
Posts: 3573
Joined: Wed Sep 17, 2008 2:25 pm

### Re: State Space Error Improving Likehood

Maybe the parameter c(72) is important.

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error Improving Likehood

the Likehood is lower than the one with the yields-only. With or without c(72).

startz
Non-normality and collinearity are NOT problems!
Posts: 3573
Joined: Wed Sep 17, 2008 2:25 pm

### Re: State Space Error Improving Likehood

You may have converged to a local optima. Try the starting values from the full model.

pvestia
Posts: 14
Joined: Wed Apr 18, 2018 4:35 am

### Re: State Space Error Improving Likehood

startz wrote:You may have converged to a local optima. Try the starting values from the full model.

I tried using only the parameters estimated by the yield-only model as initial values of the same parameters on the yield-macro model and got the same results. Negative likehood (-440) for the yield-macro model and positive likehood (400) for the yield-only model. The part that is intersting that in the literature both models have quite similar likehood.

Anyone have any sugestion how to solve this problem of "local" optimal values?

I think is important to remark this, the 3 latent factors that are common in both models, have extremely approximated values when estimating them using the yield-only and the yield-macro models.