Skip to content

Commit

Permalink
fix variable selection (obc/aux)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorek1 committed Oct 26, 2023
1 parent 5e7cf29 commit 71e89be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/get_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ function get_conditional_forecast(𝓂::ℳ,
initial_state::Vector{Float64} = [0.0],
periods::Int = 40,
parameters = nothing,
variables::Union{Symbol_input,String_input} = :all_including_auxilliary,
variables::Union{Symbol_input,String_input} = :all_excluding_obc,
conditions_in_levels::Bool = true,
levels::Bool = false,
verbose::Bool = false)
Expand Down Expand Up @@ -672,7 +672,7 @@ get_irf(RBC, RBC.parameter_values)
function get_irf(𝓂::ℳ,
parameters::Vector;
periods::Int = 40,
variables::Union{Symbol_input,String_input} = :all_including_auxilliary,
variables::Union{Symbol_input,String_input} = :all_excluding_obc,
shocks::Union{Symbol_input,String_input,Matrix{Float64},KeyedArray{Float64}} = :all,
negative_shock::Bool = false,
initial_state::Vector{Float64} = [0.0],
Expand Down Expand Up @@ -2064,7 +2064,7 @@ function get_moments(𝓂::ℳ;
standard_deviation::Bool = true,
variance::Bool = false,
covariance::Bool = false,
variables::Union{Symbol_input,String_input} = :all_including_auxilliary,
variables::Union{Symbol_input,String_input} = :all_excluding_obc,
derivatives::Bool = true,
parameter_derivatives::Union{Symbol_input,String_input} = :all,
algorithm::Symbol = :first_order,
Expand Down
4 changes: 2 additions & 2 deletions src/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ plot_model_estimates(RBC_CME, simulation([:k],:,:simulate))
function plot_model_estimates(𝓂::ℳ,
data::KeyedArray{Float64};
parameters = nothing,
variables::Union{Symbol_input,String_input} = :all_including_auxilliary,
variables::Union{Symbol_input,String_input} = :all_excluding_obc,
shocks::Union{Symbol_input,String_input} = :all,
data_in_levels::Bool = true,
shock_decomposition::Bool = false,
Expand Down Expand Up @@ -1353,7 +1353,7 @@ function plot_conditional_forecast(𝓂::ℳ,
initial_state::Vector{Float64} = [0.0],
periods::Int = 40,
parameters = nothing,
variables::Union{Symbol_input,String_input} = :all_including_auxilliary,
variables::Union{Symbol_input,String_input} = :all_excluding_obc,
conditions_in_levels::Bool = true,
levels::Bool = false,
show_plots::Bool = true,
Expand Down
6 changes: 3 additions & 3 deletions test/functionality_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function functionality_test(m; algorithm = :first_order, plots = true, verbose =
new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = reshape(m.timings.var,1,length(m.timings.var)))
new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = :all)

new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = :all_including_auxilliary)
new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = :all_excluding_obc)


new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = string.(m.timings.var[1]))
Expand All @@ -181,7 +181,7 @@ function functionality_test(m; algorithm = :first_order, plots = true, verbose =
new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = reshape(string.(m.timings.var),1,length(m.timings.var)))
# new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = string.(:all))

# new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = string.(:all_including_auxilliary))
# new_sub_irfs = get_irf(m, old_par_vals, verbose = true, variables = string.(:all_excluding_obc))
var_decomp_nv = get_variance_decomposition(m)
var_decomp = get_variance_decomposition(m, verbose = true)
new_var_decomp = get_variance_decomposition(m, verbose = true, parameters = m.parameter_values * 1.0001)
Expand Down Expand Up @@ -220,7 +220,7 @@ function functionality_test(m; algorithm = :first_order, plots = true, verbose =


# test conditional forecasting
new_sub_irfs_all = get_irf(m, verbose = true, variables = :all_including_auxilliary)
new_sub_irfs_all = get_irf(m, verbose = true, variables = :all_excluding_obc)
varnames = axiskeys(new_sub_irfs_all,1)
shocknames = axiskeys(new_sub_irfs_all,3)
sol = get_solution(m)
Expand Down

0 comments on commit 71e89be

Please sign in to comment.