Not so gleeful after all upon return. Anyways, whilst utilising the modified “dynare_estimation_1.m” code version
if ~options_.mh_posterior_mode_estimation && options_.cova_compute
[cholmat,negeigennvalues]=cholcov(hh,0);
if negeigennvalues~=0 && ~isnan(negeigennvalues)
[V,D] = eig(hh);
D=abs(D);
temp=diag(D);
temp(temp<1e-8)=1e-8;
D=diag(temp);
hh=1e-4*eye(size(hh));
[hh,negeigenvalues1]=cholcov(hh,0);
end
en lieu of the classic one
if ~options_.mh_posterior_mode_estimation && options_.cova_compute
try
chol(hh);
catch
disp(' ')
disp('POSTERIOR KERNEL OPTIMIZATION PROBLEM!')
disp(' (minus) the hessian matrix at the "mode" is not positive definite!')
disp('=> posterior variance of the estimated parameters are not positive.')
disp('You should try to change the initial values of the parameters using')
disp('the estimated_params_init block, or use another optimization routine.')
warning('The results below are most likely wrong!');
end
end
I have come across the following hindrance when exploiting mode_compute=4.
[code]Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Starting Dynare (version 4.3.3).
Starting preprocessing of the model file …
Substitution of endo lags >= 2: added 3 auxiliary variables and equations.
Found 20 equation(s).
Evaluating expressions…done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs …done
Preprocessing completed.
Starting MATLAB/Octave computing.
You did not declare endogenous variables after the estimation/calib_smoother command.
Prior distribution for parameter rho_g has two modes!
Warning: File ‘usvs1/prior’ not found.
In CheckPath at 41
In set_prior at 264
In dynare_estimation_init at 123
In dynare_estimation_1 at 59
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
Loading 67 observations from simdata.m
Initial value of the log posterior (or likelihood): -16917479858827.47
f at the beginning of new iteration, 16917479858827.4726562500
Predicted improvement: 725111275279083473207296.000000000
lambda = 1; f = 354799973695706816.0000000
lambda = 0.33333; f = 39437255816629904.0000000
lambda = 0.11111; f = 4396954658578081.5000000
lambda = 0.037037; f = 503588139409747.3125000
lambda = 0.012346; f = 70991951559073.2187500
lambda = 0.0041152; f = 22925739150193.5273438
lambda = 0.0013717; f = 17585059111086.7675781
lambda = 0.00045725; f = 16991653627368.1953125
lambda = 0.00015242; f = 16925720821237.9707031
lambda = 5.0805e-05; f = 16918395332725.2246094
lambda = 1.6935e-05; f = 16917581515835.4941406
lambda = 5.645e-06; f = 16917491133829.4179688
lambda = 1.8817e-06; f = 16917481105415.2265625
lambda = 6.2723e-07; f = 16917479995823.9375000
lambda = 2.0908e-07; f = 16917479873822.2539062
lambda = 6.9692e-08; f = 16917479860426.5898438
lambda = 2.3231e-08; f = 16917479858984.1835938
lambda = 7.7435e-09; f = 16917479858839.1464844
lambda = 2.5812e-09; f = 16917479858827.7714844
lambda =
-6.2723e-07
lambda = -6.2723e-07; f = 16917536766842.5214844
lambda = -2.0908e-07; f = 16917486180643.0429688
lambda = -6.9692e-08; f = 16917480560822.5234375
lambda = -2.3231e-08; f = 16917479936685.8984375
lambda = -7.7435e-09; f = 16917479867432.6699219
lambda = -2.5812e-09; f = 16917479859769.2148438
Norm of dx 1.2043e+10
Improvement on iteration 1 = 0.000000000
improvement < crit termination
smallest step still improving too slow, reversed gradient
Objective function at mode: 16917479858827.472656
MODE CHECK
Fval obtained by the minimization routine: 16917479858827.472656
RESULTS FROM POSTERIOR MAXIMIZATION
parameters
prior mean mode s.d. t-stat prior pstdev
eta 2.450 2.4500 10.0000 0.2450 norm 0.7500
sigma_c 1.620 1.6200 10.0000 0.1620 norm 0.3750
h 0.690 0.6900 10.0000 0.0690 beta 0.1000
omicron 5.860 5.8600 10.0000 0.5860 norm 2.0000
omega 3.230 3.2300 10.0000 0.3230 norm 0.1000
rho_rn 0.880 0.8800 10.0000 0.0880 norm 0.1000
phi_pi 1.480 1.4800 10.0000 0.1480 norm 0.1000
phi_y 0.080 0.0800 10.0000 0.0080 norm 0.0500
tau 0.660 0.6600 10.0000 0.0660 beta 0.1000
xi 0.870 0.8700 10.0000 0.0870 beta 0.1000
rho_kappa 0.490 0.4900 10.0000 0.0490 beta 0.1000
rho_z 0.750 0.7500 10.0000 0.0750 beta 0.1000
rho_s 0.866 0.8660 10.0000 0.0866 beta 0.1000
rho_a 0.822 0.8220 10.0000 0.0822 beta 0.1000
rho_vphi 0.700 0.7000 10.0000 0.0700 beta 0.1000
rho_g 0.980 0.9800 10.0000 0.0980 beta 0.1000
standard deviation of shocks
prior mean mode s.d. t-stat prior pstdev
e_kappa 0.250 0.2500 10.0000 0.0250 invg Inf
e_z 0.250 0.2500 10.0000 0.0250 invg Inf
e_a 0.250 0.2500 10.0000 0.0250 invg Inf
e_s 0.250 0.2500 10.0000 0.0250 invg Inf
e_vphi 0.250 0.2500 10.0000 0.0250 invg Inf
e_g 0.250 0.2500 10.0000 0.0250 invg Inf
Log data density [Laplace approximation] is -16917479858756.599609.
Warning: File ‘usvs1/metropolis’ not found.
In CheckPath at 41
In metropolis_hastings_initialization at 62
In random_walk_metropolis_hastings at 69
In dynare_estimation_1 at 931
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Multiple chains mode.
MH: Searching for initial values…
MH: I couldn’t get a valid initial value in 100 trials.
MH: You should Reduce mh_init_scale…
MH: Parameter mh_init_scale is equal to 0.400000.
MH: Enter a new value… 0.01
MH: I couldn’t get a valid initial value in 100 trials.
MH: You should Reduce mh_init_scale…
MH: Parameter mh_init_scale is equal to 0.010000.
MH: Enter a new value… 0.009
MH: Initial values found!
MH: Number of mh files : 1 per block.
MH: Total number of generated files : 3.
MH: Total number of iterations : 1000.
MH: average acceptation rate per chain :
0 0 0
MH: Total number of Mh draws: 1000.
MH: Total number of generated Mh files: 1.
MH: I’ll use mh-files 1 to 1.
MH: In mh-file number 1 i’ll start at line 500.
MH: Finally I keep 500 draws.
MH: I’m computing the posterior mean and covariance… Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 6.048776e-20.
In compute_mh_covariance_matrix at 74
In marginal_density at 50
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 6.048776e-20.
In marginal_density at 56
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
Done!
MH: I’m computing the posterior log marginale density (modified harmonic mean)…
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 6.048776e-20.
In marginal_density at 67
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: The support of the weighting density function is not large enough…
MH: I increase the variance of this distribution.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.766881e-18.
In marginal_density at 102
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.628578e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 7.020776e-19.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 3.854419e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.434634e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 3.001022e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.185226e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 2.664325e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.092922e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 2.740423e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.211734e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 8.509851e-19.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 5.124496e-19.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.230393e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 4.619124e-19.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 2.226457e-18.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: Let me try again.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 9.653391e-19.
In marginal_density at 108
In dynare_estimation_1 at 948
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
MH: There’s probably a problem with the modified harmonic mean estimator.
ESTIMATION RESULTS
Log data density is -Inf.
parameters
prior mean post. mean conf. interval prior pstdev
eta 2.450 2.5128 2.4941 2.5234 norm 0.7500
sigma_c 1.620 1.5726 1.5293 1.6490 norm 0.3750
h 0.690 0.7136 0.6796 0.7588 beta 0.1000
omicron 5.860 5.8657 5.8194 5.8977 norm 2.0000
omega 3.230 3.1770 3.1271 3.2162 norm 0.1000
rho_rn 0.880 0.8338 0.8009 0.8599 norm 0.1000
phi_pi 1.480 1.3702 1.2954 1.4627 norm 0.1000
phi_y 0.080 0.0732 0.0564 0.0975 norm 0.0500
tau 0.660 0.7306 0.6805 0.8035 beta 0.1000
xi 0.870 0.8748 0.8302 0.9003 beta 0.1000
rho_kappa 0.490 0.4879 0.4520 0.5515 beta 0.1000
rho_z 0.750 0.8181 0.7703 0.8459 beta 0.1000
rho_s 0.866 0.8520 0.8303 0.8792 beta 0.1000
rho_a 0.822 0.8696 0.8229 0.9085 beta 0.1000
rho_vphi 0.700 0.6995 0.5958 0.7931 beta 0.1000
rho_g 0.980 0.9080 0.7955 0.9659 beta 0.1000
standard deviation of shocks
prior mean post. mean conf. interval prior pstdev
e_kappa 0.250 0.2046 0.1689 0.2707 invg Inf
e_z 0.250 0.2836 0.1910 0.3328 invg Inf
e_a 0.250 0.3017 0.2543 0.3651 invg Inf
e_s 0.250 0.4057 0.3421 0.4611 invg Inf
e_vphi 0.250 0.2365 0.1649 0.3108 invg Inf
e_g 0.250 0.3230 0.2239 0.4111 invg Inf
Warning: BETAINV did not converge for a = 0.9408, b = 0.0192, p = 0.999.
In betainv at 61
In draw_prior_density at 47
In PlotPosteriorDistributions at 80
In dynare_estimation_1 at 951
In dynare_estimation at 70
In usvs1 at 322
In dynare at 120
Total computing time : 0h00m52s[/code]
It need be recollected that the model’s structural shocks have diminished to six: equalling the amount of observed variables, thus annihilating the erstwhile raised issue of stochastic singularity. Why do you believe to be there yet an issue with the modified harmonic mean estimator? Withal, mode_compute=6 doesn’t even work. As mentioned in a previous post of mine, ulterior model re-specification would but integrally belittle the underlying research question; I would just wish to estimate these parameters in one way or another: how is one to surmount this all? Thank you.