I’m running an otherwise nicely working CTW baseline model and wanted to check the endogenous_prior option in dynare 4.4.0 estimation command.
It gives me error:

Error using dsge_likelihood (line 812)
Endogenous prior not supported with non-stationary models

What should I do to use the built-in endogenous prior option, given that the original CTW model is non-stationary?

Ok, to be correct, CTW use stationary observables, so the diffuse filter does not have to be used and the endogenous prior will work. For me though, I’m using the same model and data transformations as in the CTW but I’m using Latvia’s data instead of Swedish data, and the estimation without the diffuse filter gives many warnings about singularity; the model is still estimated but the smoothed/filtered variables are all NaNs. Since the model is meant for forecasting purposes, I need those filtered variables. Therefore, I’m using the diffuse filter, in which case all the results are there and the forecasts look reasonable. I guess the problem is Latvia’s data, some of which might look less stationary compared to the Swedish data, although the same transformation is used. Also, I’m using the same steady-state file. Now I’m wondering which way is the correct way of doing - if the data are transformed to be (at least theoretically) stationary, should I put all my efforts to run the stationary filter? The thing I noticed just now, comparing the outcomes of the stationary and the non-stationary filters, ceteris paribus, is that the estimated coefficients differ. E.g. the scaling of disutility of work' (AL’ in CTW notation) is estimated to be about 3 by the diffuse filter compared to about 1400 in case diffuse_filter option is not used. The latter is closer to what CTW get for Swedish data by not using the diffuse filter.

To my understanding, the diffuse Kalman filter can be used for stationary data. Since mine are such (at least theoretically), I commented out the error-producing lines in the dsge_likelihood.m and ran the diffuse_filter and endogenous_prior together. The procedure started from a very small likelihood (-1331768422), reached a significant mode-improvement (1256153382) but subsequently shouted about the singularity, and ended with chol-error.