Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugs in prior density and unconstrained optimization #4

Open
ikarib opened this issue Feb 3, 2017 · 1 comment
Open

bugs in prior density and unconstrained optimization #4

ikarib opened this issue Feb 3, 2017 · 1 comment

Comments

@ikarib
Copy link
Contributor

ikarib commented Feb 3, 2017

Bug 1: Rstard should be defined as (1 + Rstarn/100) * bstar
Proof: Rstarn was defined as 100 * (rstar*pistar-1) and used in measurement equations for short-term and long-term nominal interest rates and expected FFR.

Bug 2: incorrect prior density of inverse-gamma distribution:
Proof: correct PDF is given at https://en.wikipedia.org/wiki/Scaled_inverse_chi-squared_distribution

Bug 3: the mode is constrained at the upper boundary on parameter rho_sigw
Proof: Unconstrained minimization algorithm such as csminwel requires rescaling of constrained parameters. The problem is that we don't know if any of the constraints will become binding at the mode. For example, parameter rho_sigw becomes binding at the upper boundary 0.99 that was imposed in original v990 code (as evidenced from output from IRIS optimizer fmincon). That caused the csminwel to slow down to a crawl since the unscaled parameter tried to go to infinity. I therefore had to increase this upper limit to 0.999 (since the mode is at 0.9945). As a result the Julia csminwel code which was running several days, now runs in 4 hours after binding constraint on rho_sigw was removed. We can avoid this problem in IRIS by using constrained minimization method such as fmincon (with active-set algorithm), which can estimate the model in 5 minutes.

You can see the fixed code in pull request #3 and my replication in IRIS at https://github.com/ikarib/FRBNY-IRIS

@pearlzli
Copy link
Collaborator

pearlzli commented May 3, 2017

Regarding bug 2, the given prior density refers to the square root of the inverse gamma distribution. This is because we put priors on standard deviations, not variances, in our model. This is hopefully more clear in our Julia code, where we define a RootInverseGamma type and its density. The root inverse gamma density we use comes from the appendix of Arnold Zellner's book, An Introduction to Bayesian Inference in Econometrics (1971).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants