dynarejulia / dynare.jl Goto Github PK
View Code? Open in Web Editor NEWA Julia rewrite of Dynare: solving, simulating and estimating DSGE models.
Home Page: https://www.dynare.org
License: Other
A Julia rewrite of Dynare: solving, simulating and estimating DSGE models.
Home Page: https://www.dynare.org
License: Other
ERROR: LoadError: please run Pkg.build("Pardiso") before loading the package Stacktrace: [1] error(s::String) @ Base ./error.jl:33 [2] top-level scope @ ~/.julia/packages/Pardiso/rrIt7/src/Pardiso.jl:6 [3] include @ ./Base.jl:384 [inlined] [4] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String) @ Base ./loading.jl:1235 [5] top-level scope @ none:1 [6] eval @ ./boot.jl:360 [inlined] [7] eval(x::Expr) @ Base.MainInclude ./client.jl:446 [8] top-level scope @ none:1
See request in #57
At last for Windows, do not upgrade to lastest version of Julia, as advised below. Stay at Julia v. 1.9.
I found thisout the hard way. Apparently Dynare uses another package called MUMPS. MUMPS is no longer working in Julia v. 1.10 and above. So we cannot use dynare with this version of Julia.
As a low priority feature request, it would be nice to have functions to access estimation results: posterior mode and quantiles, raw MCMC chains, acceptance rate, etc.
The error is the following
julia> @time dynare("nk_est_a","stoponerror");
Dynare version: 0.9.1
2024-01-23T15:35:35.551: Starting @dynare nk_est_a
["nk_est_a.mod", "language=julia", "json=compute"]
Dynare preprocessor version: 6.4.0+0
Starting preprocessing of the model file ...
Found 8 equation(s).
Evaluating expressions...
Computing static model derivatives (order 1).
Normalizing the static model...
Finding the optimal block decomposition of the static model...
5 block(s) found:
4 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 3 equation(s)
and 3 feedback variable(s).
Computing dynamic model derivatives (order 2).
Normalizing the dynamic model...
Finding the optimal block decomposition of the dynamic model...
3 block(s) found:
2 recursive block(s) and 1 simultaneous block(s).
the largest simultaneous block has 3 equation(s)
and 3 feedback variable(s).
JSON written after Computing step.
Preprocessing completed.
2024-01-23T15:35:35.643: End of preprocessing
2024-01-23T15:35:37.696: Start parse_statements!
ERROR: Unrecognized statement native rwmh_compute!(datafile="dsge1_data.csv", mcmc_replic=100000, mcmc_jscale=0.03, mcmc_chains=2, transformed_parameters=false, initial_values=context.work.estimated_parameters.initialvalue);
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] parse_statements!(context::Context, statements::Vector{Any})
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/DynareParser.jl:287
[3] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/DynareParser.jl:224
[4] dynare(modfile_arg::String, args::String)
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/Dynare.jl:103
[5] macro expansion
@ ./timing.jl:279 [inlined]
[6] top-level scope
@ ./REPL[5]:1
caused by: TaskFailedException
nested task error: TaskFailedException
nested task error: MethodError: no method matching MCMCChains.Chains(::Vector{…}, ::Vector{…}, ::@NamedTuple{…}; start::Int64, thin::Int64)
Closest candidates are:
MCMCChains.Chains(::AbstractArray{<:Union{Missing, Real}, 3}, ::AbstractVector{Symbol}, ::Any; start, thin, iterations, evidence, info)
@ MCMCChains ~/.julia/packages/MCMCChains/AQENn/src/chains.jl:28
MCMCChains.Chains(::AbstractVector{<:AbstractVector{<:Union{Missing, Real}}}, ::Any...; kwargs...)
@ MCMCChains ~/.julia/packages/MCMCChains/AQENn/src/chains.jl:6
MCMCChains.Chains(::AbstractVector{<:Union{Missing, Real}}, ::Any...; kwargs...)
@ MCMCChains ~/.julia/packages/MCMCChains/AQENn/src/chains.jl:10
...
Stacktrace:
[1] bundle_samples(ts::Vector{…}, model::AbstractMCMC.LogDensityModel{…}, sampler::AdvancedMH.MetropolisHastings{…}, state::AdvancedMH.Transition{…}, chain_type::Type{…}; discard_initial::Int64, thinning::Int64, param_names::Vector{…}, kwargs::@Kwargs{…})
@ AdvancedMHMCMCChainsExt ~/.julia/packages/AdvancedMH/Yiy0x/ext/AdvancedMHMCMCChainsExt.jl:35
[2] mcmcsample(rng::Random.TaskLocalRNG, model::AbstractMCMC.LogDensityModel{…}, sampler::AdvancedMH.MetropolisHastings{…}, N::Int64; progress::Bool, progressname::String, callback::Nothing, discard_initial::Int64, thinning::Int64, chain_type::Type, initial_state::Nothing, kwargs::@Kwargs{…})
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:195
[3] mcmcsample
@ ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:95 [inlined]
[4] #sample#17
@ ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:51 [inlined]
[5] sample
@ ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:44 [inlined]
[6] (::AbstractMCMC.var"#32#45"{…})()
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:387
...and 1 more exception.
Stacktrace:
[1] sync_end(c::Channel{Any})
@ Base ./task.jl:448
[2] macro expansion
@ ./task.jl:480 [inlined]
[3] (::AbstractMCMC.var"#31#44"{…})()
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:361
Stacktrace:
[1] sync_end(c::Channel{Any})
@ Base ./task.jl:448
[2] macro expansion
@ ./task.jl:480 [inlined]
[3] macro expansion
@ ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:339 [inlined]
[4] macro expansion
@ ~/.julia/packages/ProgressLogging/6KXlp/src/ProgressLogging.jl:328 [inlined]
[5] macro expansion
@ ~/.julia/packages/AbstractMCMC/Es490/src/logging.jl:9 [inlined]
[6] mcmcsample(rng::Random.TaskLocalRNG, model::AbstractMCMC.LogDensityModel{…}, sampler::AdvancedMH.MetropolisHastings{…}, ::AbstractMCMC.MCMCThreads, N::Int64, nchains::Int64; progress::Bool, progressname::String, initial_params::FillArrays.Fill{…}, initial_state::Nothing, kwargs::@Kwargs{…})
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:333
[7] mcmcsample
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:292 [inlined]
[8] #sample#19
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:90 [inlined]
[9] sample
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:81 [inlined]
[10] #sample#86
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/logdensityproblems.jl:73 [inlined]
[11] sample
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/logdensityproblems.jl:64 [inlined]
[12] #sample#18
@ AbstractMCMC ~/.julia/packages/AbstractMCMC/Es490/src/sample.jl:62 [inlined]
[13] run_mcmc(posterior_density::Dynare.DSGELogPosteriorDensity{…}, initial_values::Vector{…}, proposal_covariance::Matrix{…}, param_names::Vector{…}, mcmc_replic::Int64, mcmc_chains::Int64)
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/estimation/estimation.jl:1029
[14] mh_estimation(context::Context, observations::LinearAlgebra.Transpose{…}, obsvarnames::Vector{…}, initial_values::Vector{…}; covariance::Matrix{…}, back_transformation::Bool, first_obs::Int64, last_obs::Int64, mcmc_chains::Int64, mcmc_replic::Int64, transformed_covariance::Matrix{…}, transformed_parameters::Bool, kwargs::@Kwargs{})
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/estimation/estimation.jl:1005
[15] rwmh_compute!(; context::Context, back_transformation::Bool, datafile::String, data::AxisArrayTables.AxisArrayTable{…}, diffuse_filter::Bool, display::Bool, fast_kalman_filter::Bool, first_obs::Int64, initial_values::Vector{…}, covariance::Matrix{…}, transformed_covariance::Matrix{…}, last_obs::Int64, mcmc_chains::Int64, mcmc_init_scale::Float64, mcmc_jscale::Float64, mcmc_replic::Int64, mode_compute::Bool, nobs::Int64, order::Int64, plot_chain::Bool, plot_posterior_density::Bool, presample::Int64, transformed_parameters::Bool)
@ Dynare ~/projects/DynareJulia/Dynare.jl/src/estimation/estimation.jl:251
[16] top-level scope
@ none:1
Some type information was truncated. Use `show(err)` to see complete types.
diffuse_filter
in the estimation command/functionsThe new release for the DataFrames.jl is 1.3.4
and we are using 1.3.2
so we need to bump it
context = @dynare "./xyz.mod";
[ Info: Dynare version: 0.8.1
[ Info: 2023-09-04T00:21:10.671: Starting @dynare ./xyz.mod
["xyz.mod", "language=julia", "json=compute"]
[ Info: Dynare preprocessor version: 6.3.0+0
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...
Computing static model derivatives (order 1).
Normalizing the static model...
Finding the optimal block decomposition of the static model...
2 block(s) found:
0 recursive block(s) and 2 simultaneous block(s).
the largest simultaneous block has 4 equation(s)
and 4 feedback variable(s).
Computing dynamic model derivatives (order 2).
Normalizing the dynamic model...
Finding the optimal block decomposition of the dynamic model...
2 block(s) found:
0 recursive block(s) and 2 simultaneous block(s).
the largest simultaneous block has 4 equation(s)
and 4 feedback variable(s).
JSON written after Computing step.
Preprocessing completed.
[ Info: 2023-09-04T00:21:10.737: End of preprocessing
[ Info: 2023-09-04T00:21:10.761: Start parse_statements!
Iter f(x) inf-norm Step 2-norm
ERROR: LoadError: LinearAlgebra.LAPACKException(6)
Stacktrace:
[1] chklapackerror
@ C:\Users\KRISHNENDU\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\LinearAlgebra\src\lapack.jl:40 [inlined]
[2] gges!(ws::FastLapackInterface.GeneralizedSchurWs{Float64}, jobvsl::Char, jobvsr::Char, A::Matrix{Float64}, B::Matrix{Float64}; select::PolynomialMatrixEquations.var"#1#2"{Float64}, resize::Bool)
@ FastLapackInterface C:\Users\KRISHNENDU.julia\packages\FastLapackInterface\ZNkxZ\src\schur.jl:364
[3] gges!
@ C:\Users\KRISHNENDU.julia\packages\FastLapackInterface\ZNkxZ\src\schur.jl:309 [inlined]
[4] gs_solver!(ws::PolynomialMatrixEquations.GsSolverWs, d::Matrix{Float64}, e::Matrix{Float64}, n1::Int64, qz_criterium::Float64)
@ PolynomialMatrixEquations C:\Users\KRISHNENDU.julia\packages\PolynomialMatrixEquations\5luE3\src\GeneralizedSchurDecompositionSolver.jl:38
[5] solve!
@ C:\Users\KRISHNENDU.julia\packages\LinearRationalExpectations\8YoRq\src\linear_rational_expectations.jl:148 [inlined]
[6] solve_g1!(results::LinearRationalExpectations.LinearRationalExpectationsResults, ws::LinearRationalExpectations.LinearGsSolverWs, options::LinearRationalExpectations.LinearRationalExpectationsOptions)
@ LinearRationalExpectations C:\Users\KRISHNENDU.julia\packages\LinearRationalExpectations\8YoRq\src\linear_rational_expectations.jl:157
[7] first_order_solver!(results::LinearRationalExpectations.LinearRationalExpectationsResults, jacobian::Matrix{Float64}, options::LinearRationalExpectations.LinearRationalExpectationsOptions, ws::LinearRationalExpectations.LinearRationalExpectationsWs)
@ LinearRationalExpectations C:\Users\KRISHNENDU.julia\packages\LinearRationalExpectations\8YoRq\src\linear_rational_expectations.jl:460
[8] compute_first_order_solution!(context::Context, endogenous::Vector{Float64}, exogenous::Vector{Float64}, steadystate::Vector{Float64}, params::Vector{Float64}, model::Model, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions; variance_decomposition::Bool)
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:590
[9] compute_first_order_solution!
@ C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:561 [inlined]
[10] compute_stoch_simul!(context::Context, ws::Dynare.DynamicWs, params::Vector{Float64}, options::Dynare.StochSimulOptions; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:variance_decomposition,), Tuple{Bool}}})
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:498
[11] compute_stoch_simul!
@ C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:482 [inlined]
[12] stoch_simul_core!(context::Context, ws::Dynare.DynamicWs, options::Dynare.StochSimulOptions)
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:421
[13] stoch_simul!(context::Context, field::Dict{String, Any})
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\perturbations.jl:390
[14] parse_statements!(context::Context, statements::Vector{Any})
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\DynareParser.jl:311
[15] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\DynareParser.jl:224
[16] dynare(::String)
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\Dynare.jl:84
[17] var"@dynare"(source::LineNumberNode, module::Module, modfile_arg::String, args::Vararg{Any})
@ Dynare C:\Users\KRISHNENDU.julia\packages\Dynare\iuXSt\src\Dynare.jl:55
in expression starting at REPL[8]:1
When upgrading to the new version of the Dynare preprocessor, we need to take into account the following breaking changes:
modfile.json
. The current syntax is supported by function get_mcps!
in DynareParser.jl
See https://juliahub.com/ui/Packages/General/Dynare
Use https://github.com/JuliaCI/PkgEval.jl for testing/debugging
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
Hello professor Juillard,
Using your excellent Julia package I came across with an error. Here I show the .mod file for a simple Solow model.
% Simple Solow Model
var Y K Z;
varexo e;
parameters alpha delta s rho;
alpha = 0.35;
delta = 0.025;
s = 0.1;
rho = 0.75;
% Model equations
model(linear);
Y=Z+K(-1)alpha;
K= (1 - delta)K(-1) + deltaY;
Z = rhoZ(-1)+e;
end;
shocks;
var e; stderr 1;
end;
steady;
stoch_simul;
Solow.txt
WHICH GIVES:
Steady state
───┬─────
Y │ 0.0
K │ 0.0
Z │ 0.0
───┴─────
The model is already linearized and the steady state of the variables is correct (0,0,0) then I get this error:
BoundsError([0 1 2; 3 4 5], (3, 1))
Do you know why is this happening?
Thank you very much.
I decided to move from MATLAB to Julia. In order to get up and running with Dynare/Julia I cloned this repo to my local folder (the address shown below), then I cd-ed to that folder and followed the instructions exactly as written in README.md, however, I ran into several errors. Having thought I have had some problems in general registry and packages, I deleteed the entire July installation and reinstalled clean version of it. The script below shows my Julia REPL for the first time after installation was complete. Despite this, it still runs into the same error when running example1 test model in this repo. Below I copied the entire output from my REPL (note that I have not installed any other packages yet. This was clean Julia package). I am not proficient enough with Julia (strated getting to know with it only a couple of days ago) to debug this error message and since I have clean install of Julia and I folowed the instructions in README.md file exactly I suspect there could be a problem with the repo itself.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.2 (2022-02-06)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> pwd()
"C:\\Users\\giorg"
julia> cd
cd (generic function with 4 methods)
julia> cd()
julia> pwd()
"C:\\Users\\giorg"
julia> pwd(./document)
ERROR: syntax: "./" is not a unary operator
Stacktrace:
[1] top-level scope
@ none:1
julia> cd(./documenst)
ERROR: syntax: "./" is not a unary operator
Stacktrace:
[1] top-level scope
@ none:1
julia> cd(./documents)
ERROR: syntax: "./" is not a unary operator
Stacktrace:
[1] top-level scope
@ none:1
julia> cd("./documents")
julia> pwd()
Downloaded artifact: LZO
Downloaded artifact: FriBidi
Downloaded artifact: Rmath
Downloaded artifact: GLFW
Downloaded artifact: x264
Downloaded artifact: FreeType2
Downloaded artifact: libpng
Downloaded artifact: Zstd
Downloaded artifact: Expat
Downloaded artifact: Libtiff
Downloaded artifact: PCRE
Downloaded artifact: Libffi
Downloaded artifact: Ogg
Downloaded artifact: XSLT
Downloaded artifact: OpenSpecFun
Downloaded artifact: Wayland_protocols
Downloaded artifact: Graphite2
Downloaded artifact: libass
Downloaded artifact: Pixman
Downloaded artifact: XML2
Downloaded artifact: Gettext
Downloaded artifact: OpenSSL
Downloaded artifact: FFMPEG
Downloaded artifact: Libgcrypt
Downloaded artifact: LAME
Downloaded artifact: Libiconv
Downloaded artifact: DynarePreprocessor
Downloaded artifact: Glib
Downloaded artifact: libvorbis
Updating `C:\Users\giorg\.julia\environments\v1.7\Project.toml`
[5203de40] + Dynare v0.2.0
Updating `C:\Users\giorg\.julia\environments\v1.7\Manifest.toml`
[79e6a3ab] + Adapt v3.3.3
[4fba245c] + ArrayInterface v4.0.3
[6e4b80f9] + BenchmarkTools v1.3.1
[336ed68f] + CSV v0.10.2
[d360d2e6] + ChainRulesCore v1.12.0
[9e997f8a] + ChangesOfVariables v0.1.2
[944b1d66] + CodecZlib v0.7.0
[35d6a980] + ColorSchemes v3.17.1
[3da002f7] + ColorTypes v0.11.0
[5ae59095] + Colors v0.12.8
[bbf7d656] + CommonSubexpressions v0.3.0
[34da2185] + Compat v3.41.0
[d38c429a] + Contour v0.5.7
[a8cc5b0e] + Crayons v4.1.1
[9a962f9c] + DataAPI v1.9.0
[a93c6f00] + DataFrames v1.3.2
[864edb3b] + DataStructures v0.18.11
[e2d170a0] + DataValueInterfaces v1.0.0
[163ba53b] + DiffResults v1.0.3
[b552c78f] + DiffRules v1.9.1
[b4f34e82] + Distances v0.10.7
[ffbed154] + DocStringExtensions v0.8.6
[5203de40] + Dynare v0.2.0
[e2ba6199] + ExprTools v0.1.8
[78f5a1cc] + ExtendedDates v0.1.1
[c87230d0] + FFMPEG v0.4.1
[29a986be] + FastLapackInterface v0.1.3
[48062228] + FilePathsBase v0.9.17
[6a86dc24] + FiniteDiff v2.10.1
[53c48c17] + FixedPointNumbers v0.8.4
[59287772] + Formatting v0.4.2
[f6369f11] + ForwardDiff v0.10.25
[28b8d3ca] + GR v0.64.0
[5c1252a2] + GeometryBasics v0.4.1
[42e2da0e] + Grisu v1.0.2
[cd3eb016] + HTTP v0.9.17
[615f187c] + IfElse v0.1.1
[83e8ac13] + IniFile v0.5.0
[842dd82b] + InlineStrings v1.1.2
[3587e190] + InverseFunctions v0.1.2
[41ab1584] + InvertedIndices v1.1.0
[92d709cd] + IrrationalConstants v0.1.1
[c8e1da08] + IterTools v1.4.0
[42fd0dbc] + IterativeSolvers v0.9.2
[82899510] + IteratorInterfaceExtensions v1.0.0
[692b3bcd] + JLLWrappers v1.4.1
[682c06a0] + JSON v0.21.3
[ec016732] + KalmanFilterTools v0.1.0
[b964fa9f] + LaTeXStrings v1.3.0
[23fbe1c1] + Latexify v0.15.9
[d3d80556] + LineSearches v7.1.1
[7a12625a] + LinearMaps v3.5.1
[45f42fbc] + LinearRationalExpectations v0.1.3
[2ab3a3ac] + LogExpFunctions v0.3.6
[1914dd2f] + MacroTools v0.5.9
[739be429] + MbedTLS v1.0.3
[442fdcdd] + Measures v0.3.1
[e1d29d7a] + Missings v1.0.2
[d41bc354] + NLSolversBase v7.8.2
[77ba4419] + NaNMath v0.3.7
[bac558e1] + OrderedCollections v1.4.1
[d96e819e] + Parameters v0.12.3
[69de0a69] + Parsers v2.2.2
[ccf2f8ad] + PlotThemes v2.0.1
[995b91a9] + PlotUtils v1.1.3
[91a5bcdd] + Plots v1.25.10
[4f9d485d] + PolynomialMatrixEquations v0.1.0
[2dfb63ee] + PooledArrays v1.4.0
[21216c6a] + Preferences v1.2.3
[08abe8d2] + PrettyTables v1.3.1
[3cdcf5f2] + RecipesBase v1.2.1
[01d81517] + RecipesPipeline v0.5.0
[189a3867] + Reexport v1.2.2
[05181044] + RelocatableFolders v0.1.3
[ae029012] + Requires v1.3.0
[79098fc4] + Rmath v0.7.0
[7e49a35a] + RuntimeGeneratedFunctions v0.5.3
[6c6a2e73] + Scratch v1.1.0
[91c51154] + SentinelArrays v1.3.12
[992d4aef] + Showoff v1.0.3
[a2af1166] + SortingAlgorithms v1.0.1
[276daf66] + SpecialFunctions v2.1.2
[aedffcd0] + Static v0.5.5
[90137ffa] + StaticArrays v1.3.5
[82ae8749] + StatsAPI v1.2.0
[2913bbd2] + StatsBase v0.33.15
[4c63d2b9] + StatsFuns v0.9.15
[09ab397b] + StructArrays v0.6.4
[fd094767] + Suppressor v0.2.0
[3783bdb8] + TableTraits v1.0.1
[bd369af6] + Tables v1.6.1
[ff13af16] + TimeDataFrames v0.1.3
[0796e94c] + Tokenize v0.5.21
[3bb67fe8] + TranscodingStreams v0.9.6
[5c2747f8] + URIs v1.3.0
[3a884ed6] + UnPack v1.0.2
[1cfade01] + UnicodeFun v0.4.1
[41fe7b60] + Unzip v0.1.2
[ea10d353] + WeakRefStrings v1.4.1
[6e34b625] + Bzip2_jll v1.0.8+0
[83423d85] + Cairo_jll v1.16.1+1
[23afba7c] + DynarePreprocessor_jll v4.8.0+0
[5ae413db] + EarCut_jll v2.2.3+0
[2e619515] + Expat_jll v2.4.4+0
[b22a6f82] + FFMPEG_jll v4.4.0+0
[a3f928ae] + Fontconfig_jll v2.13.93+0
[d7e528f0] + FreeType2_jll v2.10.4+0
[559328eb] + FriBidi_jll v1.0.10+0
[0656b61e] + GLFW_jll v3.3.6+0
[d2c73de3] + GR_jll v0.64.0+0
[78b55507] + Gettext_jll v0.21.0+0
[7746bdde] + Glib_jll v2.68.3+2
[3b182d85] + Graphite2_jll v1.3.14+0
[2e76f6c2] + HarfBuzz_jll v2.8.1+1
[aacddb02] + JpegTurbo_jll v2.1.2+0
[c1c5ebd0] + LAME_jll v3.100.1+0
[dd4b983a] + LZO_jll v2.10.1+0
[e9f186c6] + Libffi_jll v3.2.2+1
[d4300ac3] + Libgcrypt_jll v1.8.7+0
[7e76a0d4] + Libglvnd_jll v1.3.0+3
[7add5ba3] + Libgpg_error_jll v1.42.0+0
[94ce4f54] + Libiconv_jll v1.16.1+1
[4b2f31a3] + Libmount_jll v2.35.0+0
[89763e89] + Libtiff_jll v4.3.0+0
[38a345b3] + Libuuid_jll v2.36.0+0
[e7412a2a] + Ogg_jll v1.3.5+1
[458c3c95] + OpenSSL_jll v1.1.13+0
[efe28fd5] + OpenSpecFun_jll v0.5.5+0
[91d4177d] + Opus_jll v1.3.2+0
[2f80f16e] + PCRE_jll v8.44.0+0
[30392449] + Pixman_jll v0.40.1+0
[ea2cea3b] + Qt5Base_jll v5.15.3+0
[f50d1b31] + Rmath_jll v0.3.0+0
[a2964d1f] + Wayland_jll v1.19.0+0
[2381bf8a] + Wayland_protocols_jll v1.23.0+0
[02c8fc9c] + XML2_jll v2.9.12+0
[aed1982a] + XSLT_jll v1.1.34+0
[4f6342f7] + Xorg_libX11_jll v1.6.9+4
[0c0b7dd1] + Xorg_libXau_jll v1.0.9+4
[935fb764] + Xorg_libXcursor_jll v1.2.0+4
[a3789734] + Xorg_libXdmcp_jll v1.1.3+4
[1082639a] + Xorg_libXext_jll v1.3.4+4
[d091e8ba] + Xorg_libXfixes_jll v5.0.3+4
[a51aa0fd] + Xorg_libXi_jll v1.7.10+4
[d1454406] + Xorg_libXinerama_jll v1.1.4+4
[ec84b674] + Xorg_libXrandr_jll v1.5.2+4
[ea2f1a96] + Xorg_libXrender_jll v0.9.10+4
[14d82f49] + Xorg_libpthread_stubs_jll v0.1.0+3
[c7cfdc94] + Xorg_libxcb_jll v1.13.0+3
[cc61e674] + Xorg_libxkbfile_jll v1.1.0+4
[12413925] + Xorg_xcb_util_image_jll v0.4.0+1
[2def613f] + Xorg_xcb_util_jll v0.4.0+1
[975044d2] + Xorg_xcb_util_keysyms_jll v0.4.0+1
[0d47668e] + Xorg_xcb_util_renderutil_jll v0.3.9+1
[c22f9ab0] + Xorg_xcb_util_wm_jll v0.4.1+1
[35661453] + Xorg_xkbcomp_jll v1.4.2+4
[33bec58e] + Xorg_xkeyboard_config_jll v2.27.0+4
[c5fb5394] + Xorg_xtrans_jll v1.4.0+3
[3161d3a3] + Zstd_jll v1.5.2+0
[0ac62f75] + libass_jll v0.15.1+0
[f638f0a6] + libfdk_aac_jll v2.0.2+0
[b53b4c65] + libpng_jll v1.6.38+0
[f27f6e37] + libvorbis_jll v1.3.7+1
[1270edf5] + x264_jll v2021.5.5+0
[dfaa095f] + x265_jll v3.5.0+0
[d8fb68d0] + xkbcommon_jll v0.9.1+5
[0dad84c5] + ArgTools
[56f22d72] + Artifacts
[2a0f44e3] + Base64
[ade2ca70] + Dates
[8bb1440f] + DelimitedFiles
[8ba89e20] + Distributed
[f43a241f] + Downloads
[9fa8497b] + Future
[b77e0a4c] + InteractiveUtils
[b27032c2] + LibCURL
[76f85450] + LibGit2
[8f399da3] + Libdl
[37e2e46d] + LinearAlgebra
[56ddb016] + Logging
[d6f4376e] + Markdown
[ca575930] + NetworkOptions
[44cfe95a] + Pkg
[de0858da] + Printf
[9abbd945] + Profile
[3fa0cd96] + REPL
[9a3f8284] + Random
[ea8e919c] + SHA
[9e88b42a] + Serialization
[1a1011a3] + SharedArrays
[6462fe0b] + Sockets
[2f01184e] + SparseArrays
[10745b16] + Statistics
[fa267f1f] + TOML
[a4e569a6] + Tar
[8dfed614] + Test
[cf7118a7] + UUIDs
[4ec0a83e] + Unicode
[e66e0078] + CompilerSupportLibraries_jll
[deac9b47] + LibCURL_jll
[29816b5a] + LibSSH2_jll
[c8ffd9c3] + MbedTLS_jll
[14a3606d] + MozillaCACerts_jll
[4536629a] + OpenBLAS_jll
[05823500] + OpenLibm_jll
[83775a58] + Zlib_jll
[8e850b90] + libblastrampoline_jll
[8e850ede] + nghttp2_jll
173 dependencies successfully precompiled in 272 seconds
julia> pwd()
"C:\\Users\\giorg\\documents\\Julia\\Dynare\\Dynare.jl"
julia> using Dynare
julia>
julia> context = @dynare "./test/models/example1/example1.mod";
[ Info: 2022-02-15T23:08:51.531: Starting @dynare ./test/models/example1/example1.mod
["example1.mod", "language=julia", "json=compute"]
Starting preprocessing of the model file ...
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
JSON written after Computing step.
Preprocessing completed.
[ Info: 2022-02-15T23:08:52.644: End of preprocessing
ERROR: LoadError: Failed to precompile example1Dynamic [top-level] to C:\Users\giorg\.julia\compiled\v1.7\jl_2440.tmp.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base .\loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base .\loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base .\loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base .\loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base .\loading.jl:997
[7] eval
@ .\boot.jl:373 [inlined]
[8] eval
@ C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\Dynare.jl:1 [inlined]
[9] macro expansion
@ C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\dynare_containers.jl:709 [inlined]
[10] macro expansion
@ C:\Users\giorg\.julia\packages\Suppressor\nTjgZ\src\Suppressor.jl:35 [inlined]
[11] load_dynare_function(modname::String, compileoption::Bool)
@ Dynare C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\dynare_containers.jl:706
[12] Model(modfilename::String, modfileinfo::Dynare.ModFileInfo, endogenous_nbr::Int64, lead_lag_incidence::Vector{Vector{Int64}}, exogenous_nbr::Int64, lagged_exogenous_nbr::Int64, exogenous_deterministic_nbr::Int64, parameter_nbr::Int64, orig_endo_nbr::Int64, aux_vars::Vector{Any}, maximum_endo_lag::Int64, maximum_endo_lead::Int64, maximum_exo_lag::Int64, maximum_exo_lead::Int64, maximum_exo_det_lag::Int64, maximum_exo_det_lead::Int64, maximum_lag::Int64, maximum_lead::Int64, orig_maximum_endo_lag::Int64, orig_maximum_endo_lead::Int64, orig_maximum_exo_lag::Int64, orig_maximum_exo_lead::Int64, orig_maximum_exo_det_lag::Int64, orig_maximum_exo_det_lead::Int64, orig_maximum_lag::Int64, orig_maximum_lead::Int64, NNZDerivatives::Vector{Int64}, compileoption::Bool)
@ Dynare C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\dynare_containers.jl:381
[13] get_model(modfilename::String, modfileinfo::Dynare.ModFileInfo, dynare_model_info::Dict{String, Any}, commandlineoptions::Dynare.CommandLineOptions, endo_nbr::Int64, exo_nbr::Int64, exo_det_nbr::Int64, param_nbr::Int64, orig_endo_nbr::Int64, aux_vars::Vector{Any})
@ Dynare C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\DynareParser.jl:60
[14] parser(modfilename::String, commandlineoptions::Dynare.CommandLineOptions)
@ Dynare C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\DynareParser.jl:160
[15] var"@dynare"(__source__::LineNumberNode, __module__::Module, modfile_arg::String, args::Vararg{Any})
@ Dynare C:\Users\giorg\.julia\packages\Dynare\YgY1L\src\Dynare.jl:53
in expression starting at REPL[18]:1
Hi,
I am facing an error when requesting a stoch_simul in Julia for a standard small-dimension NK model:
"ERROR: LoadError: MethodError: no method matching get_power_deriv(::Float64, ::Int64, ::Int64)"
ts_nk_model_mod.txt
ts_nk_model.txt
The dynare code works in matlab, so I don't see a reason why it should not work in Julia.
Attached you can find the .mod and .jl files (in txt format).
Thanks for transitioning from Matlab!
On dynare.jl v0.9.12 and Julia 1.11.0beta1, mh_nblocks appears not to have any effect:
Using mh_nblocks=4, as follows:
estimation(order=1, datafile='dsgedata.csv', mh_replic=20000, mh_nblocks=4, mh_jscale=2.) ;
The results appear to be for a single chain of length 20000:
Acceptance rate chain 1: 0.26595
Chains MCMC chain (20000×8×1 Array{Float64, 3}):
Iterations = 1:1:20000
Number of chains = 1
Samples per chain = 20000
In the context file, this seems to be confirmed:
julia> (context.results.model_results[1]).estimation.posterior_mcmc_chains_nbr
1
Hi,
There is a small typo in the file graphics.jl:
Line 125 in e11f044
"exonenous_name" should be " exogenous_names" (defined line 119 just above).
This sometimes lead to error messages:
LoadError: UndefVarError: exonenous_name not defined
in expression starting at In[54]:1
Stacktrace:
[1] plot_irfs(y::Vector{Matrix{Float64}}, model::Model, symboltable::Dict{String, DynareSymbol}, filepath::String)
@ Dynare ~/.julia/packages/Dynare/7hgrr/src/graphics.jl:125
For the example1.mod
example, change the list of variables to print for instance with stoch_simul(order=1) y c k;
. The irfs still contain exactly the same variables in the same orders.
For a bigger model, independently of the stoch_simul
command, I found that it prints the first 8 variables in declaration order and ignores the next one.
I would like to do plain ML estimation, which is not yet supported as of v0.9.12. I'm attaching example code. The file mle.txt is the mod file, but github doesn't seem to like the .mod extension.
When run, the error is
MethodError(Dynare.parse_prior_distribution, (Val{0}(), Dict{String, Any}("p4" => "NaN", "jscale" => "NaN", "prior_distribution" => 0, "param" => "rhoA", "lower_bound" => "(-Inf)", "p3" => "NaN", "upper_bound" => "Inf", "init_val" => "0.9226", "mean" => "NaN", "std" => "NaN")), 0x00000000000068c3) 2024-05-28T11:58:18.274: End parser
It looks like Formatting.jl
(which is not currently being maintained) is no longer needed as a dependency for this package.
I was investigating changing it to use Format.jl
(which has fixed most all of the issues with Formatting.jl), but the one place it was being used was in src/reporting/report.jl
, but that was removed about 2 years ago.
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.