I have a two-country structural model to estimate. My estimation works fine for a similar scale open economy model, but when I expand it by adding corresponding foreign counterparts, the estimation always says “bad gradient” no matter what (different starting values, alternative observable data series). I was wondering:

Does this look like a problem of my model?

When there are too many variables in the model, is that going to cause a problem for Dynare to compute gradient?

the model may just be a bad fit on the data. the posterior may be very ‘hilly’ or very ‘flat’ depending the curvature of the likelihood and the prior.

i have been estimating a similar 2 country model for sometime now.
i learned the following lessons during my exercises.

Use tight curved priors at first and then loosen them as we make some progress. the priors are our saviours!

start from a simple model before you add extensions ONE by ONE. in theory or calibration , one can afford to be ‘general to specific’ but estimation with volatile series is a different ball-game.

change ONE feature at a time. Be it a friction or an observable. otherwise we will have a hard time figuring out what factor changed results.

To ‘get a better fit’ add lags and costs of adjustment of capital, investment, habit etc. then one may get lower persistence of the shocks.

also, it may be useful to estimate separately for both countries ( closed economy) versions. and then use the modes obtained as starting values for the open economy versions.