Neutral interest rate mode optimization problem

Hello, I am trying to estimate neutral interest rate using two equations: IS and phillips curve.

Unfortunately, there seems to be a problem with mode maximization.
The error message states that hessian in mode is not positive definite.

Some information about the model:
I am using exogenous time series for output gap, annualized GDP trend growth rate, yoy core inflation and real fed rate. Data has no linear trends. Data does not contain Covid time periods. Neutral interest rate is supposed to be extracted from IS equation and is connected to GDP trend growth.
usa_wob.mod (1.2 KB)
data.xlsx (18.4 KB)

If someone have any advice on this it will be extremely appreciated.

See

Thank you, professor. I should’ve read this paper before asking question.
As I understood, there are two ways to work with non-zero-mean data.

  1. Demean it with different filters and then pass them to equations as deviations from SS;
  2. Pass data to observation equation as a sum of intercept which represent steady-state value and deviation from it and then estimate or filter them both.

I feel that second approach is closer to inclusion of intercepts into transition equations. I tried to include intercepts (mode file attached) and this did not work with modeoptim 4 and 5. I also tried to demean data with same result.
usa_wob.mod (1.3 KB)

Add mode_check to see that your measurement error hits the upper bounds specified. Also, you should specify your AR-processes along the lines of

yo = (1-a1-a2)*mu1 + a1 * yo(-1) + a2 * yo(-2) + arr * (r(-1) - rstar(-1)) + gap_sh;
po = (1-b-b1)*mu2 + b * po(-1) + b1 * (po(-2) + po(-3) + po(-4)) / 3 + by * yo(-1) + p_sh;

for the constants to be independent of the persistence parameters. Finally, r1 seems to be not identified.