From f6267caf0f97b11510e2eb528f4f66e4a76a3c47 Mon Sep 17 00:00:00 2001 From: thorek1 Date: Sun, 10 Sep 2023 19:28:37 +0200 Subject: [PATCH] test pruned 2nd and 3rd order moment output --- test/functionality_tests.jl | 247 ++++++++++++++++++------------------ 1 file changed, 124 insertions(+), 123 deletions(-) diff --git a/test/functionality_tests.jl b/test/functionality_tests.jl index 8b984d53..0be602a4 100644 --- a/test/functionality_tests.jl +++ b/test/functionality_tests.jl @@ -30,133 +30,98 @@ function functionality_test(m; algorithm = :first_order, plots = true, verbose = nsss = get_non_stochastic_steady_state(m) nsss = get_SS(m) - if algorithm == :first_order - - auto_corr_nv = get_autocorrelation(m) - auto_corrr = get_autocorrelation(m, verbose = true) - new_auto_corr = get_autocorrelation(m, verbose = true, parameters = m.parameter_values * 1.0001) - new_auto_corr1 = get_autocorrelation(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) - new_auto_corr2 = get_autocorrelation(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_auto_corr3 = get_autocorrelation(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_auto_corr3 = get_autocorr(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_auto_corr3 = autocorr(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - old_auto_corr = get_autocorrelation(m, verbose = true, parameters = old_par_vals) - - new_auto_corr1 = get_autocorrelation(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) - new_auto_corr2 = get_autocorrelation(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_auto_corr3 = get_autocorrelation(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_auto_corr3 = get_autocorr(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_auto_corr3 = autocorr(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - old_auto_corr = get_autocorrelation(m, verbose = true, parameters = old_par_vals) - - corr_nv = get_correlation(m) - corrr = get_correlation(m, verbose = true) - new_corr = get_correlation(m, verbose = true, parameters = m.parameter_values * 1.0001) - new_corr1 = get_correlation(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) - new_corr2 = get_correlation(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_corr3 = get_correlation(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_corr3 = get_corr(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_corr3 = corr(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - old_corr = get_correlation(m, verbose = true, parameters = old_par_vals) - - new_corr1 = get_correlation(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) - new_corr2 = get_correlation(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_corr3 = get_correlation(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_corr3 = get_corr(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_corr3 = corr(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - old_corr = get_correlation(m, verbose = true, parameters = old_par_vals) - - - 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) - new_var_decomp1 = get_variance_decomposition(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) - new_var_decomp2 = get_variance_decomposition(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_var_decomp3 = get_variance_decomposition(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_var_decomp3 = get_var_decomp(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - old_var_decomp = get_variance_decomposition(m, verbose = true, parameters = old_par_vals) - - new_var_decomp1 = get_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) - new_var_decomp2 = get_variance_decomposition(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_var_decomp3 = get_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_var_decomp3 = get_var_decomp(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - old_var_decomp = get_variance_decomposition(m, verbose = true, parameters = old_par_vals) - - cond_var_decomp_nv = get_conditional_variance_decomposition(m) - cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true) - cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, periods = [1]) - cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, periods = [10]) - cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, periods = [1,10]) - cond_var_decomp5 = get_conditional_variance_decomposition(m, verbose = true, periods = [1,Inf]) - cond_var_decomp6 = get_conditional_variance_decomposition(m, verbose = true, periods = [Inf,2]) - new_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = m.parameter_values * 1.0001) - new_cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) - new_cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_cond_var_decomp3 = fevd(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - old_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = old_par_vals) - - new_cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) - new_cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_cond_var_decomp3 = fevd(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - old_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = old_par_vals) + if algorithm ∈ [:first_order, :pruned_second_order, :pruned_third_order] + auto_corr_nv = get_autocorrelation(m, algorithm = algorithm) + auto_corrr = get_autocorrelation(m, algorithm = algorithm, verbose = true) + new_auto_corr = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = m.parameter_values * 1.0001) + new_auto_corr1 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) + new_auto_corr2 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_auto_corr3 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_auto_corr3 = get_autocorr(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_auto_corr3 = autocorr(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + old_auto_corr = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) + + new_auto_corr1 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) + new_auto_corr2 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_auto_corr3 = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_auto_corr3 = get_autocorr(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_auto_corr3 = autocorr(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + old_auto_corr = get_autocorrelation(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) + + corr_nv = get_correlation(m, algorithm = algorithm) + corrr = get_correlation(m, algorithm = algorithm, verbose = true) + new_corr = get_correlation(m, algorithm = algorithm, verbose = true, parameters = m.parameter_values * 1.0001) + new_corr1 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) + new_corr2 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_corr3 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_corr3 = get_corr(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_corr3 = corr(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + old_corr = get_correlation(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) + + new_corr1 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) + new_corr2 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_corr3 = get_correlation(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_corr3 = get_corr(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_corr3 = corr(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + old_corr = get_correlation(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) # Check different inputs for get_moments - moms_nv = get_moments(m) - moms = get_moments(m, verbose = true) - moms_var = get_moments(m, verbose = true, variance = true) - moms_covar = get_moments(m, verbose = true, covariance = true) - moms_no_nsss = get_moments(m, verbose = true, non_stochastic_steady_state = false) - moms_no_nsss = get_moments(m, verbose = true, standard_deviation = false) - moms_no_nsss = get_moments(m, verbose = true, standard_deviation = false, variance = true) - moms_no_derivs = get_moments(m, verbose = true, derivatives = false) - moms_no_derivs_var = get_moments(m, verbose = true, derivatives = false, variance = true) - - moms_select_par_deriv1 = get_moments(m, verbose = true, parameter_derivatives = m.parameters[1]) - moms_select_par_deriv2 = get_moments(m, verbose = true, parameter_derivatives = m.parameters[1:2]) - moms_select_par_deriv3 = get_moments(m, verbose = true, parameter_derivatives = Tuple(m.parameters[1:3])) - moms_select_par_deriv4 = get_moments(m, verbose = true, parameter_derivatives = reshape(m.parameters[1:3],3,1)) - - moms_select_par_deriv1 = get_moments(m, verbose = true, parameter_derivatives = string.(m.parameters[1])) - moms_select_par_deriv2 = get_moments(m, verbose = true, parameter_derivatives = string.(m.parameters[1:2])) - moms_select_par_deriv3 = get_moments(m, verbose = true, parameter_derivatives = Tuple(string.(m.parameters[1:3]))) - moms_select_par_deriv4 = get_moments(m, verbose = true, parameter_derivatives = reshape(string.(m.parameters[1:3]),3,1)) - - new_moms1 = get_moments(m, verbose = true, parameters = m.parameter_values * 1.0001) - new_moms2 = get_moments(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) - new_moms3 = get_moments(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_moments(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - old_moms = get_moments(m, verbose = true, parameters = old_par_vals) - - new_moms2 = get_moments(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) - new_moms3 = get_moments(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_moments(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - old_moms = get_moments(m, verbose = true, parameters = old_par_vals) - - - new_moms4 = get_standard_deviation(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_variance(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = get_covariance(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - new_moms4 = get_std(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_var(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = get_cov(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) - new_moms4 = std(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = var(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = cov(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.000)) - - new_moms4 = get_standard_deviation(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_variance(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = get_covariance(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - new_moms4 = get_std(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = get_var(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = get_cov(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) - new_moms4 = std(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) - new_moms4 = var(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) - new_moms4 = cov(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.000)) - + moms_nv = get_moments(m, algorithm = algorithm) + moms = get_moments(m, algorithm = algorithm, verbose = true) + moms_var = get_moments(m, algorithm = algorithm, verbose = true, variance = true) + moms_covar = get_moments(m, algorithm = algorithm, verbose = true, covariance = true) + moms_no_nsss = get_moments(m, algorithm = algorithm, verbose = true, non_stochastic_steady_state = false) + moms_no_nsss = get_moments(m, algorithm = algorithm, verbose = true, standard_deviation = false) + moms_no_nsss = get_moments(m, algorithm = algorithm, verbose = true, standard_deviation = false, variance = true) + moms_no_derivs = get_moments(m, algorithm = algorithm, verbose = true, derivatives = false) + moms_no_derivs_var = get_moments(m, algorithm = algorithm, verbose = true, derivatives = false, variance = true) + + moms_select_par_deriv1 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = m.parameters[1]) + moms_select_par_deriv2 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = m.parameters[1:2]) + moms_select_par_deriv3 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = Tuple(m.parameters[1:3])) + moms_select_par_deriv4 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = reshape(m.parameters[1:3],3,1)) + + moms_select_par_deriv1 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = string.(m.parameters[1])) + moms_select_par_deriv2 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = string.(m.parameters[1:2])) + moms_select_par_deriv3 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = Tuple(string.(m.parameters[1:3]))) + moms_select_par_deriv4 = get_moments(m, algorithm = algorithm, verbose = true, parameter_derivatives = reshape(string.(m.parameters[1:3]),3,1)) + + new_moms1 = get_moments(m, algorithm = algorithm, verbose = true, parameters = m.parameter_values * 1.0001) + new_moms2 = get_moments(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) + new_moms3 = get_moments(m, algorithm = algorithm, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_moments(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + old_moms = get_moments(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) + + new_moms2 = get_moments(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) + new_moms3 = get_moments(m, algorithm = algorithm, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_moments(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + old_moms = get_moments(m, algorithm = algorithm, verbose = true, parameters = old_par_vals) + + + new_moms4 = get_standard_deviation(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_variance(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = get_covariance(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + new_moms4 = get_std(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_var(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = get_cov(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + new_moms4 = std(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = var(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = cov(m, algorithm = algorithm, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.000)) + + new_moms4 = get_standard_deviation(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_variance(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = get_covariance(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + new_moms4 = get_std(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = get_var(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = get_cov(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + new_moms4 = std(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_moms4 = var(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_moms4 = cov(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.000)) + new_moms4 = get_mean(m, algorithm = algorithm, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.000)) + end + if algorithm == :first_order irfs_nv = get_irf(m, m.parameter_values) irfs = get_irf(m, m.parameter_values, verbose = true) irfs_10 = get_irf(m, m.parameter_values, verbose = true, periods = 10) @@ -207,6 +172,42 @@ function functionality_test(m; algorithm = :first_order, plots = true, verbose = # 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)) + 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) + new_var_decomp1 = get_variance_decomposition(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) + new_var_decomp2 = get_variance_decomposition(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_var_decomp3 = get_variance_decomposition(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_var_decomp3 = get_var_decomp(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + old_var_decomp = get_variance_decomposition(m, verbose = true, parameters = old_par_vals) + + new_var_decomp1 = get_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) + new_var_decomp2 = get_variance_decomposition(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_var_decomp3 = get_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_var_decomp3 = get_var_decomp(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + old_var_decomp = get_variance_decomposition(m, verbose = true, parameters = old_par_vals) + + cond_var_decomp_nv = get_conditional_variance_decomposition(m) + cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true) + cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, periods = [1]) + cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, periods = [10]) + cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, periods = [1,10]) + cond_var_decomp5 = get_conditional_variance_decomposition(m, verbose = true, periods = [1,Inf]) + cond_var_decomp6 = get_conditional_variance_decomposition(m, verbose = true, periods = [Inf,2]) + new_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = m.parameter_values * 1.0001) + new_cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, parameters = (m.parameters[1] => m.parameter_values[1] * 1.0001)) + new_cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, parameters = Tuple(m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0001)) + new_cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] / 1.0001)) + new_cond_var_decomp3 = fevd(m, verbose = true, parameters = (m.parameters[1:2] .=> m.parameter_values[1:2] * 1.0002)) + old_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = old_par_vals) + + new_cond_var_decomp1 = get_conditional_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1]) => m.parameter_values[1] * 1.0001)) + new_cond_var_decomp2 = get_conditional_variance_decomposition(m, verbose = true, parameters = Tuple(string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0001)) + new_cond_var_decomp3 = get_conditional_variance_decomposition(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] / 1.0001)) + new_cond_var_decomp3 = fevd(m, verbose = true, parameters = (string.(m.parameters[1:2]) .=> m.parameter_values[1:2] * 1.0002)) + old_cond_var_decomp = get_conditional_variance_decomposition(m, verbose = true, parameters = old_par_vals) + + # test conditional forecasting new_sub_irfs_all = get_irf(m, verbose = true, variables = :all_including_auxilliary)