diff --git a/src/get_functions.jl b/src/get_functions.jl index df373b98..9ee104b3 100644 --- a/src/get_functions.jl +++ b/src/get_functions.jl @@ -2131,9 +2131,9 @@ function get_correlation(𝓂::β„³; solve!(𝓂, parameters = parameters, algorithm = algorithm, verbose = verbose) if algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, SS_and_pars = calculate_third_order_moments(𝓂.parameter_values, :full_covar, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, state_ΞΌ, SS_and_pars, solved = calculate_third_order_moments(𝓂.parameter_values, :full_covar, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) elseif algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) else covar_dcmp, sol, _, SS_and_pars, solved = calculate_covariance(𝓂.parameter_values, 𝓂, verbose = verbose, lyapunov_algorithm = lyapunov_algorithm) @@ -2225,9 +2225,9 @@ function get_autocorrelation(𝓂::β„³; solve!(𝓂, parameters = parameters, algorithm = algorithm, verbose = verbose) if algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, autocorr, SS_and_pars = calculate_third_order_moments(𝓂.parameter_values, 𝓂.timings.var, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, autocorrelation = true) + covar_dcmp, state_ΞΌ, autocorr, SS_and_pars, solved = calculate_third_order_moments(𝓂.parameter_values, 𝓂.timings.var, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, autocorrelation = true) elseif algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) sΜ‚_to_ŝ₂ⁱ = β„’.diagm(ones(size(Ξ£αΆ»β‚‚,1))) @@ -2459,7 +2459,7 @@ function get_moments(𝓂::β„³; end if algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) # dvariance = π’œ.jacobian(𝒷(), x -> covariance_parameter_derivatives_second_order(x, param_idx, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose), 𝓂.parameter_values[param_idx])[1] dvariance = π’Ÿ.jacobian(x -> max.(β„’.diag(calculate_second_order_moments(x, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose)[1]),eps(Float64)), backend, 𝓂.parameter_values)[:,param_idx] @@ -2468,7 +2468,7 @@ function get_moments(𝓂::β„³; var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end elseif algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, _ = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, state_ΞΌ, _, solved = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) # dvariance = π’œ.jacobian(𝒷(), x -> covariance_parameter_derivatives_third_order(x, variables, param_idx, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose), 𝓂.parameter_values[param_idx])[1] dvariance = π’Ÿ.jacobian(x -> max.(β„’.diag(calculate_third_order_moments(x, variables, 𝓂, dependencies_tol = dependencies_tol, lyapunov_algorithm = lyapunov_algorithm, sylvester_algorithm = sylvester_algorithm, verbose = verbose)[1]),eps(Float64)), backend, 𝓂.parameter_values)[:,param_idx] @@ -2526,7 +2526,7 @@ function get_moments(𝓂::β„³; end if algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) # dst_dev = π’œ.jacobian(𝒷(), x -> sqrt.(covariance_parameter_derivatives_second_order(x, param_idx, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose)), 𝓂.parameter_values[param_idx])[1] dst_dev = π’Ÿ.jacobian(x -> sqrt.(max.(β„’.diag(calculate_second_order_moments(x, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose)[1]),eps(Float64))), backend, 𝓂.parameter_values)[:,param_idx] @@ -2535,7 +2535,7 @@ function get_moments(𝓂::β„³; var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end elseif algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, _ = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, state_ΞΌ, _, solved = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) # dst_dev = π’œ.jacobian(𝒷(), x -> sqrt.(covariance_parameter_derivatives_third_order(x, variables, param_idx, 𝓂, dependencies_tol = dependencies_tol, lyapunov_algorithm = lyapunov_algorithm, sylvester_algorithm = sylvester_algorithm, verbose = verbose)), 𝓂.parameter_values[param_idx])[1] dst_dev = π’Ÿ.jacobian(x -> sqrt.(max.(β„’.diag(calculate_third_order_moments(x, variables, 𝓂, dependencies_tol = dependencies_tol, lyapunov_algorithm = lyapunov_algorithm, sylvester_algorithm = sylvester_algorithm, verbose = verbose)[1]),eps(Float64))), backend, 𝓂.parameter_values)[:,param_idx] @@ -2612,12 +2612,12 @@ function get_moments(𝓂::β„³; if variance if algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end elseif algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, _ = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) + covar_dcmp, state_ΞΌ, _, solved = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end @@ -2638,12 +2638,12 @@ function get_moments(𝓂::β„³; if standard_deviation if algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end elseif algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, _ = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) + covar_dcmp, state_ΞΌ, _, solved = calculate_third_order_moments(𝓂.parameter_values, variables, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end @@ -2657,12 +2657,12 @@ function get_moments(𝓂::β„³; if covariance if algorithm == :pruned_second_order - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(𝓂.parameter_values, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end elseif algorithm == :pruned_third_order - covar_dcmp, state_ΞΌ, _ = calculate_third_order_moments(𝓂.parameter_values, :full_covar, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) + covar_dcmp, state_ΞΌ, _, solved = calculate_third_order_moments(𝓂.parameter_values, :full_covar, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, dependencies_tol = dependencies_tol, verbose = verbose) if mean var_means = KeyedArray(state_ΞΌ[var_idx]; Variables = axis1) end @@ -2861,6 +2861,8 @@ function get_statistics(𝓂, all_parameters = vcat(other_parameter_values, parameter_values)[sort_idx] + solved = true + if algorithm == :pruned_third_order && !(!(standard_deviation == Symbol[]) || !(variance == Symbol[]) || !(covariance == Symbol[]) || !(autocorrelation == Symbol[])) algorithm = :pruned_second_order end @@ -2872,20 +2874,20 @@ function get_statistics(𝓂, if !(autocorrelation == Symbol[]) second_mom_third_order = union(autocorrelation, standard_deviation, variance, covariance) - covar_dcmp, state_ΞΌ, autocorr, SS_and_pars = calculate_third_order_moments(all_parameters, second_mom_third_order, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, autocorrelation = true, autocorrelation_periods = autocorrelation_periods) + covar_dcmp, state_ΞΌ, autocorr, SS_and_pars, solved = calculate_third_order_moments(all_parameters, second_mom_third_order, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, autocorrelation = true, autocorrelation_periods = autocorrelation_periods) elseif !(standard_deviation == Symbol[]) || !(variance == Symbol[]) || !(covariance == Symbol[]) - covar_dcmp, state_ΞΌ, SS_and_pars = calculate_third_order_moments(all_parameters, union(variance,covariance,standard_deviation), 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, state_ΞΌ, SS_and_pars, solved = calculate_third_order_moments(all_parameters, union(variance,covariance,standard_deviation), 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) end elseif algorithm == :pruned_second_order if !(standard_deviation == Symbol[]) || !(variance == Symbol[]) || !(covariance == Symbol[]) || !(autocorrelation == Symbol[]) - covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(all_parameters, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) + covar_dcmp, Ξ£αΆ»β‚‚, state_ΞΌ, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(all_parameters, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose) else - state_ΞΌ, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = calculate_second_order_moments(all_parameters, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, covariance = false) + state_ΞΌ, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = calculate_second_order_moments(all_parameters, 𝓂, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm, verbose = verbose, covariance = false) end else diff --git a/src/moments.jl b/src/moments.jl index 489c32c5..128bfc26 100644 --- a/src/moments.jl +++ b/src/moments.jl @@ -140,7 +140,7 @@ function calculate_second_order_moments( verbose::Bool = false, sylvester_algorithm::Symbol = :doubling, lyapunov_algorithm::Symbol = :doubling, - tol::AbstractFloat = eps())::Union{Tuple{Matrix{R}, Matrix{R}, Vector{R}, Vector{R}, Matrix{R}, Matrix{R}, Matrix{R}, Matrix{R}, Matrix{R}, Vector{R}, Matrix{R}, Matrix{R}, AbstractSparseMatrix{R}, AbstractSparseMatrix{R}}, Tuple{Vector{R}, Vector{R}, Matrix{R}, Matrix{R}, Vector{R}, Matrix{R}, Matrix{R}, AbstractSparseMatrix{R}, AbstractSparseMatrix{R}}} where R <: Real + tol::AbstractFloat = eps())::Union{Tuple{Matrix{R}, Matrix{R}, Vector{R}, Vector{R}, Matrix{R}, Matrix{R}, Matrix{R}, Matrix{R}, Matrix{R}, Vector{R}, Matrix{R}, Matrix{R}, AbstractSparseMatrix{R}, AbstractSparseMatrix{R}, Bool}, Tuple{Vector{R}, Vector{R}, Matrix{R}, Matrix{R}, Vector{R}, Matrix{R}, Matrix{R}, AbstractSparseMatrix{R}, AbstractSparseMatrix{R}, Bool}} where R <: Real Σʸ₁, 𝐒₁, βˆ‡β‚, SS_and_pars, solved = calculate_covariance(parameters, 𝓂, verbose = verbose, lyapunov_algorithm = lyapunov_algorithm) @@ -245,7 +245,7 @@ function calculate_second_order_moments( ΞΌΚΈβ‚‚ = SS_and_pars[1:𝓂.timings.nVars] + sΜ‚_to_yβ‚‚ * μ˒⁺₂ + yvβ‚‚ if !covariance - return ΞΌΚΈβ‚‚, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ + return ΞΌΚΈβ‚‚, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved && solved2 end # Covariance @@ -265,7 +265,7 @@ function calculate_second_order_moments( autocorr_tmp = sΜ‚_to_sΜ‚β‚‚ * Ξ£αΆ»β‚‚ * sΜ‚_to_yβ‚‚' + eΜ‚_to_sΜ‚β‚‚ * Ξ“β‚‚ * eΜ‚_to_yβ‚‚' - return Ξ£ΚΈβ‚‚, Ξ£αΆ»β‚‚, ΞΌΚΈβ‚‚, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ + return Ξ£ΚΈβ‚‚, Ξ£αΆ»β‚‚, ΞΌΚΈβ‚‚, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved && solved2 && info end @@ -291,10 +291,10 @@ function calculate_third_order_moments(parameters::Vector{T}, sylvester_algorithm = sylvester_algorithm, lyapunov_algorithm = lyapunov_algorithm) - Ξ£ΚΈβ‚‚, Ξ£αΆ»β‚‚, ΞΌΚΈβ‚‚, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ = second_order_moments + Ξ£ΚΈβ‚‚, Ξ£αΆ»β‚‚, ΞΌΚΈβ‚‚, Δμ˒₂, autocorr_tmp, sΜ‚_to_sΜ‚β‚‚, sΜ‚_to_yβ‚‚, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved = second_order_moments if !covariance && !autocorrelation - return ΞΌΚΈβ‚‚, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚ + return ΞΌΚΈβ‚‚, Δμ˒₂, Σʸ₁, Σᢻ₁, SS_and_pars, 𝐒₁, βˆ‡β‚, 𝐒₂, βˆ‡β‚‚, solved end βˆ‡β‚ƒ = calculate_third_order_derivatives(parameters, SS_and_pars, 𝓂)# * 𝓂.solution.perturbation.third_order_auxilliary_matrices.π”βˆ‡β‚ƒ @@ -533,9 +533,9 @@ function calculate_third_order_moments(parameters::Vector{T}, end if autocorrelation - return Σʸ₃, ΞΌΚΈβ‚‚, autocorr, SS_and_pars + return Σʸ₃, ΞΌΚΈβ‚‚, autocorr, SS_and_pars, solved && solved3 && info else - return Σʸ₃, ΞΌΚΈβ‚‚, SS_and_pars + return Σʸ₃, ΞΌΚΈβ‚‚, SS_and_pars, solved && solved3 && info end end