-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cholesky identification #2
Comments
Hi Benj,
Thanks, I will look into that. My prior is that some changes in the Julia
function performing Cholesky could have created some bug in the code. It
would be not the first time given that, as far as I remember, the built-in
function was just modified in the previous version and I had some
headaches. I used the code to replicate Kilian and Kim (2011) paper in the
past, thus I am pretty confident with results.
However, I will tell you my posterior as soon as I check it. Meanwhile, I
am adding you to the project
Luca
2018-07-03 22:48 GMT+02:00 Benjamin Born <notifications@github.com>:
… Hi Luca,
Sorry to bother you again but I tried to use your package to replicate
some Cholesky identified IRFs generated using old Matlab codes of mine and
I didn't succeed. I then noticed that in the irf_chol() function you have
the following line:
https://github.com/lucabrugnolini/VAR.jl/blob/
2f0f8e5/src/VAR.jl#L548
This is puzzling as full(cholfact(A)) just reconstructs the matrix A but
I think what you need is the lower diagonal matrix cholfact(A)[:L]. See
the following example
A = [2.0 2.0; 2.0 2.0]
Base.LinAlg.Cholesky{Float64,Array{Float64,2}} with factor:
[1.41421 0.0; 1.41421 2.10734e-8]
cholfact(A)[:L]
2×2 LowerTriangular{Float64,Array{Float64,2}}:
1.41421 ⋅
1.41421 2.10734e-8
full(cholfact(A))
2×2 Array{Float64,2}:
2.0 2.0
2.0 2.0
If I replace line 548 by mSigma = cholfact(V.Σ)[:L], I can replicate my
results. I'm probably missing something and it would be great if you could
help me out.
Best, Benjamin
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLhwIrn3teAyG-FNEL64nFAcHRvHEgCks5uC9iMgaJpZM4VBmm8>
.
--
*Luca Brugnolini*
*Central Bank of Malta, Research Department*
*University of Rome Tor Vergata, Department of Economics and Finance*
*Personal website <http://lucabrugnolini.github.io>*
|
Thanks for looking into this and for adding me to the project. I guess it would be worthwhile to set up some tests so that if Julia syntax breaks we are alerted. Maybe we could test against the codes supplied with the Kilian/Luetkepohl book at: http://www-personal.umich.edu/~lkilian/book.html |
Agree, this was exactly the book I had in mind for the implementation of
the various identification strategies. Using it also for testing it's
actually a great idea.
2018-07-04 13:34 GMT+02:00 Benjamin Born <notifications@github.com>:
… Thanks for looking into this and for adding me to the project.
I guess it would be worthwhile to set up some tests so that if Julia
syntax breaks we are alerted. Maybe we could test against the codes
supplied with the Kilian/Luetkepohl book at:
http://www-personal.umich.edu/~lkilian/book.html
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLhwF__Awb7uQh35N7pPdM1eFDRTaXhks5uDKg4gaJpZM4VBmm8>
.
--
*Luca Brugnolini*
*Central Bank of Malta, Research Department*
*University of Rome Tor Vergata, Department of Economics and Finance*
*Personal website <http://lucabrugnolini.github.io>*
|
I did some fix and added an example in test/runtest.jl with known DGP. Have a check if you still get the same problem, and in case let me know. Thanks |
Yep, that fixes the issue. Thanks a lot. |
…-00-07-26-922-4217838583 CompatHelper: add new compat entry for "GrowableArrays" at version "0.1"
Hi Luca,
Sorry to bother you again but I tried to use your package to replicate some Cholesky identified IRFs generated using old Matlab codes of mine and I didn't succeed. I then noticed that in the
irf_chol()
function you have the following line:https://github.com/lucabrugnolini/VAR.jl/blob/2f0f8e51e32c92494df1598b1095b5718811cf2b/src/VAR.jl#L548
This is puzzling as
full(cholfact(A))
just reconstructs the matrixA
but I think what you need is the lower diagonal matrixcholfact(A)[:L]
. See the following exampleIf I replace line 548 by
mSigma = cholfact(V.Σ)[:L]
, I can replicate my results. I'm probably missing something and it would be great if you could help me out.Best, Benjamin
The text was updated successfully, but these errors were encountered: