From 0838aec0019faca18e816e9c31d282cf2c5aed7d Mon Sep 17 00:00:00 2001 From: thorek1 Date: Mon, 11 Sep 2023 00:10:07 +0200 Subject: [PATCH] calc mean for linear --- src/MacroModelling.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MacroModelling.jl b/src/MacroModelling.jl index 1679f5f0..5e999b0b 100644 --- a/src/MacroModelling.jl +++ b/src/MacroModelling.jl @@ -4109,10 +4109,14 @@ end function calculate_mean(parameters::Vector{T}, 𝓂::ℳ; verbose::Bool = false, algorithm = :pruned_second_order, tol::Float64 = eps()) where T <: Real # Theoretical mean identical for 2nd and 3rd order pruned solution. - @assert algorithm ∈ [:pruned_second_order, :pruned_third_order] "Theoretical mean only available for pruned second and third order perturbation solutions." + @assert algorithm ∈ [:linear_time_iteration, :riccati, :first_order, :quadratic_iteration, :binder_pesaran, :pruned_second_order, :pruned_third_order] "Theoretical mean only available for pruned second and third order perturbation solutions." SS_and_pars, solution_error = 𝓂.SS_solve_func(parameters, 𝓂, verbose) + if algorithm ∈ [:linear_time_iteration, :riccati, :first_order, :quadratic_iteration, :binder_pesaran] + return SS_and_pars[1:𝓂.timings.nVars], solution_error + end + ∇₁ = calculate_jacobian(parameters, SS_and_pars, 𝓂) |> Matrix 𝐒₁, solved = calculate_first_order_solution(∇₁; T = 𝓂.timings)