jmaih / RISE_toolbox

Solution and estimation of Markov Switching Rational Expectations / DSGE Models
BSD 3-Clause "New" or "Revised" License
105 stars 78 forks source link

three questions about the estimation #136

Closed 55Kidd closed 4 years ago

55Kidd commented 4 years ago

Dear Junior Maih: I was recently using the RISE toolbox you developed to study the MS-DSGE, but there are three questions about the estimation when I run the RISE:

  1. when looking for good enough start values, Matlab shows the massage: Your initial point x0 is not between bounds lb and ub; FMINCON; shifted x0 to strictly satisfy the bounds. So why does Matlab report the massage? Do I need to do something to modify it?
  2. when looking for good enough start values, fmincon stopped because the size of the current step is less than the selected value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance. Change in X too small. Fmincon of examples in RISE toolbox stopped after hundreds of times, however, when I run my model, it stopped after several times. How to modify it?
  3. there is a warming that the matrix is close to a singular value, or the scaling is incorrect. The result may be inaccurate. RCOND = 2.229894e-22. And how to modify?

Hope you can take the time to answer my questions. Best wishes! Kidd June 22, 2020

jmaih commented 4 years ago

Hi Kidd,

  1. It must be the case that the start value for one (or more) of your parameters lies outside the bounds you specified. You should check the way you set your priors and understand the role played by each number
  2. If your start values for estimation are close to a peak, there is no reason for fmincon to search for a long time. Oftentimes though, it is the case that optimization stops at a local maximum while what you ideally want is the global maximum.
  3. The warning that a matrix is singular may come from the fact that the procedure tries to invert a matrix that is not invertible. Without seeing exactly what you are doing, I cannot tell you where the problem comes from.

Cheers and Best wishes,

J

On Mon, Jun 22, 2020 at 10:48 AM 55Kidd notifications@github.com wrote:

Dear Junior Maih: I was recently using the RISE toolbox you developed to study the MS-DSGE, but there are three questions about the estimation when I run the RISE:

  1. when looking for good enough start values, Matlab shows the massage: Your initial point x0 is not between bounds lb and ub; FMINCON; shifted x0 to strictly satisfy the bounds. So why does Matlab report the massage? Do I need to do something to modify it?
  2. when looking for good enough start values, fmincon stopped because the size of the current step is less than the selected value of the step size tolerance and constraints are satisfied to within the default value of the constraint tolerance. Change in X too small. Fmincon of examples in RISE toolbox stopped after hundreds of times, however, when I run my model, it stopped after several times. How to modify it?
  3. there is a warming that the matrix is close to a singular value, or the scaling is incorrect. The result may be inaccurate. RCOND = 2.229894e-22. And how to modify?

Hope you can take the time to answer my questions. Best wishes! Kidd June 22, 2020

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATKBT4BIJWZQJFLCTGHLN3RX4LE3ANCNFSM4OELTBFA .

55Kidd commented 4 years ago

Dear Junior Maih: Is the result reliable with only 2 trials?Could you please tell me how to deal with the problems of fmincon and singularity? Here is my code: 1.zip Many thanks! Kidd June 23, 2020

jmaih commented 4 years ago

I think I have answered this question in another thread. See #137