-
Notifications
You must be signed in to change notification settings - Fork 1
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
Problems running main.R #11
Comments
Here are my results. "horserace_ecy" robustnessRuns to completion without error in my computer. "horserace_nfci" robustnessRuns to completion without error in my computer. "1M" robustnessRuns to completion without error in my computer. I have 32GB. "horserace_no_vfci_yes_gz" robustnessGives the same error that Matt is getting in "horserace_ecy":
I ran it 10 times, and each time it gave the same error, so it does not seem to be run-dependent. "horserace_no_vfci_yes_gz" robustnessGives the same error that Matt is getting in "horserace_nfci" robustness:
I also ran this one 10 times, and each time it gave the same error, so it does not seem to be run-dependent either. |
It seems if I adjust the seed in I think that the Bayesian VAR is approximating a matrix inverse operation numerically, which relies upon the seed. But it must be that the matrix is close to not positive definite/invertible, so we sometimes get these errors. It is odd that it depends not just on the seed, but also which computer we are running it on. |
If I change the below line macro_dynamics/1_vol_bvar_estimation.R Line 12 in cba1833
To a seed of |
I tried setting the seed Error in MASS::mvrnorm(n = 1, mu = rep(0, length(optout$x)), Sigma = optout$opt$H) :
'Sigma' is not positive definite |
I tried setting the seed set.seed(968) got the same error as before |
macro_dynamics/1_vol_bvar_calibration.R Lines 168 to 172 in cba1833
|
Setting: mn_tight_calib <- 3 made the entire code run without errors. On the other hand, some of the plots came out funky, e.g.: mcmc_out_horserace_no_vfci_yes_tedr_irplot_all_shocks_TEDR_shock.pdf mcmc_out_horserace_ecy_irplot_all_shocks_VFCI_shock.pdf I also tried a value for Any suggestions on what value to pick? |
I was only able to get the code to run when I increased the For those figures, however, I think the problem is just that the y-axis scale is hard-coded here: macro_dynamics/1_vol_bvar_calibration.R Lines 55 to 61 in dd24f4b
|
I think I found the solution. I have added the following code: macro_dynamics/1_vol_bvar_calibration.R Lines 188 to 192 in 15962e8
The "disperse" option uses the inverse hessian to adjust the start of the bayesian draws. This inverse hessian matrix is the one that doesn't work for some of us, on some seeds, for some of the horserace robustnesses. If I turn it off, then the code runs for me. I have set the @fernando-duarte @ti719 Can someone confirm the code runs for them in this new state? |
Also, I have updated the y-axes for the IRF figures to try to fix the problem Fernando was noting earlier. There might still be a few that need tweaking. |
The y axis would need to be adjusted for some calibrations based on the
magnitude of the IRFs. In my computer, the baseline calibration of 0.5 runs
but some of the others tried here do not work. We should probably not go to
a calibration above 5
…On Tuesday, March 4, 2025, Matthew DeHaven ***@***.***> wrote:
I was only able to get the code to run when I increased the mn_tight_calib
to 100. I got the same errors as before trying 3, 5, and 10.
For those figures, however, I think the problem is just that the y-axis
scale is hard-coded here:
https://github.com/VFCI/macro_dynamics/blob/dd24f4b420d6cda343dea66ca38955
98453b42d5/1_vol_bvar_calibration.R#L55-L61
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAMISLDBC64FNPDTL6J4C32SXE7XAVCNFSM6AAAAABWWHGDZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGE2DONBQGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: matdehaven]*matdehaven* left a comment (VFCI/macro_dynamics#11)
<#11 (comment)>
I was only able to get the code to run when I increased the mn_tight_calib
to 100. I got the same errors as before trying 3, 5, and 10.
For those figures, however, I think the problem is just that the y-axis
scale is hard-coded here:
https://github.com/VFCI/macro_dynamics/blob/dd24f4b420d6cda343dea66ca38955
98453b42d5/1_vol_bvar_calibration.R#L55-L61
—
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAMISLDBC64FNPDTL6J4C32SXE7XAVCNFSM6AAAAABWWHGDZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGE2DONBQGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
"horserace_ecy" robustness
Gives the following error:
This is coming from "1_vol_bvar_estimation.R" script, in the
gdraw()
function on line 78."horserace_nfci" robustness
Gives the following error:
This is coming from "1_vol_bvar_estimation.R" script on line 45.
"1M" robustness
runs out of memory on my computer (16 GB)
The text was updated successfully, but these errors were encountered: