lucabrugnolini / vectorautoregressions.jl Goto Github PK
View Code? Open in Web Editor NEWVector autoregressive model in Julia
Home Page: http://lucabrugnolini.github.io/VectorAutoregressions.jl/
License: MIT License
Vector autoregressive model in Julia
Home Page: http://lucabrugnolini.github.io/VectorAutoregressions.jl/
License: MIT License
Hi Luca,
It's kind of unfortunate that the package and the module have different names: VAR
vs VARs
. I think the Julia convention is to keep them the same. We cannot rename the module to VAR
as that clashes with the function and type VAR
. But what about naming the package and module VectorAutoregressions.jl
. The name is a bit more descriptive for non-macroeconomists which might also help when registering the package. I also think it's not too long to type once in a using
statement.
Let me know what you think. Best,
Benjamin
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 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
Suggestion: add a method that checks eigenvalues and returns whether VAR is stable.
From browsing the code quickly there's already a function that generates the companion form, so it'll be simple to implement.
If you want, I can add it myself and make a PR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.