<p>If anyone per chance runs into the same issue,</p>

<p>The reason the MLE is exploding is that a system with explosive roots (eigenvalues outside the unit circle), might make the Kalman-filter predictions explode at a point, and thus creating a few very large MLE values. </p>

<p>The solution is to rig the MLE function s.t. if any of the eigenvalues lie outside the unit circle, return an MLE >=0. Thus the optimization algorithm will be forced to find a stationary local minimum. </p>

CC BY-SA 3.0
2016-03-19T18:54:38.823Z
2016-03-19T18:54:38.823Z
hipHopMetropolisHastings
<p>I'm trying to estimate an unknown ARMA(p,q) series via a Kalman Filter &amp; QMLE.</p>

<p>The issue is most of my optimized likelihood values end up around -350, except one or two which are hugely positive! It doesn't seem likely that adding a single AR or MA lag would cause such a drastic jump in my likelihood function.</p>

<p>I've tried messing around with optimization parameters in Matlab such as MaxFunEval, and MaxIter but I am still finding this issue.</p>

<p>If this is the wrong place for a question like this I apologize in advanced. </p>

CC BY-SA 3.0
2016-03-19T01:23:00.527Z
Please clarify: what you are saying is that, for a few  $(p,q)$ specifications you get a "hugely positive" likelihood values, while the likelihood values of all other specifications you tried cluster at the value $-350$?
Alecos Papadopoulos
CC BY-SA 3.0
2016-03-19T01:39:32.283Z
I'm estimating via MLE models $p \in 1,2,\ldots,7$ and $q \in 0,1,\ldots,7$. Most all of my likelihood values are either -350, but some are below -1000. Each time fmincon (I'm restricting $\sigma$ to be positive) returns a positive value (around 300-600) for a specifications and estimates a system with explosive AR roots. I know the process is stationary. We then need to use the AIC to choose the best model. My issue is that the positive log-likelihood always gets the smallest AIC which I'm convinced is a mistake.
hipHopMetropolisHastings
<econometrics><time-series>
Need Advice Debugging MLE Code to Estimate an ARMA(p,q)
hipHopMetropolisHastings
# Need Advice Debugging MLE Code to Estimate an ARMA(p,q)

(Asked by: username_0 on 2016-03-19)

I'm trying to estimate an unknown ARMA(p,q) series via a Kalman Filter & QMLE.

The issue is most of my optimized likelihood values end up around -350, except one or two which are hugely positive! It doesn't seem likely that adding a single AR or MA lag would cause such a drastic jump in my likelihood function.

I've tried messing around with optimization parameters in Matlab such as MaxFunEval, and MaxIter but I am still finding this issue.

If this is the wrong place for a question like this I apologize in advanced.

**Tags:** econometrics, time-series

> **Comments:**
> **username_1**: Please clarify: what you are saying is that, for a few  $(p,q)$ specifications you get a "hugely positive" likelihood values, while the likelihood values of all other specifications you tried cluster at the value $-350$?  
> **username_0**: I'm estimating via MLE models $p \in 1,2,\ldots,7$ and $q \in 0,1,\ldots,7$. Most all of my likelihood values are either -350, but some are below -1000. Each time fmincon (I'm restricting $\sigma$ to be positive) returns a positive value (around 300-600) for a specifications and estimates a system with explosive AR roots. I know the process is stationary. We then need to use the AIC to choose the best model. My issue is that the positive log-likelihood always gets the smallest AIC which I'm convinced is a mistake.  

---

## 1 answers

### Answer by username_0 on 2016-03-19. Score: 3 | Accepted answer

If anyone per chance runs into the same issue,

The reason the MLE is exploding is that a system with explosive roots (eigenvalues outside the unit circle), might make the Kalman-filter predictions explode at a point, and thus creating a few very large MLE values.

The solution is to rig the MLE function s.t. if any of the eigenvalues lie outside the unit circle, return an MLE >=0. Thus the optimization algorithm will be forced to find a stationary local minimum.


---

