Page 1 of 1

error mcmc

PostPosted: Mon Mar 07, 2016 8:42 am
by permeh
hi every one i run my model and i see this error:Error in McMCDiagnostics_core (line 111). please help me.

Re: error mcmc

PostPosted: Mon Mar 07, 2016 5:48 pm
by jpfeifer
Always provide full error messages and state which Dynare version with which command you are using.

Re: error mcmc

PostPosted: Thu Mar 10, 2016 9:20 am
by permeh
hi my result is. but i think this not true.
There are 10 eigenvalue(s) larger than 1 in modulus
for 10 forward-looking variable(s)

The rank condition is verified.

Loading 42 observations from tez1.xlsx

Initial value of the log posterior (or likelihood): -12355691.862

==========================================================
Change in the covariance matrix = 10.
Mode improvement = 12355314.2054
New value of jscale = 0.00042171
==========================================================

==========================================================
Change in the covariance matrix = 0.035392.
Mode improvement = 122.4891
New value of jscale = 0.049328
==========================================================

==========================================================
Change in the covariance matrix = 0.031226.
Mode improvement = 50.6078
New value of jscale = 0.031845
==========================================================

Optimal value of the scale parameter = 0.031845

Final value of the log posterior (or likelihood): 204.5596


MODE CHECK

Fval obtained by the minimization routine: 204.559637

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
1.344557e-17.
> In dyn_first_order_solver at 311
In stochastic_solvers at 217
In resol at 137
In dynare_resolve at 69
In dsge_likelihood at 256
In mode_check at 141
In dynare_estimation_1 at 701
In dynare_estimation at 89
In dsgetezfinalex2 at 1390
In dynare at 180
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =
1.206848e-16.
> In dyn_first_order_solver at 311
In stochastic_solvers at 217
In resol at 137
In dynare_resolve at 69
In dsge_likelihood at 256
In mode_check at 141
In dynare_estimation_1 at 701
In dynare_estimation at 89
In dsgetezfinalex2 at 1390
In dynare at 180

RESULTS FROM POSTERIOR ESTIMATION
parameters
prior mean mode s.d. prior pstdev

betta 0.980 0.9789 0.0003 beta 0.0100
b 1.350 1.4137 0.0037 gamm 0.0500
sigmac 1.521 1.5437 0.0023 gamm 0.0500
eta 0.300 0.2949 0.0002 gamm 0.0100
sigmalu 2.920 2.9590 0.0035 gamm 0.0500
sigmalr 2.200 2.1924 0.0013 gamm 0.0500
etao 1.150 1.1449 0.0008 gamm 0.0200
etaa 1.400 1.4075 0.0008 gamm 0.0200
nu 2.000 1.9780 0.0015 gamm 0.0200
omegao 0.200 0.1907 0.0007 beta 0.0200
thetao 4.330 4.3182 0.0010 gamm 0.0200
muo 2.600 2.6177 0.0021 gamm 0.0200
alphao 0.420 0.4177 0.0008 beta 0.0200
iotao 0.280 0.2998 0.0010 beta 0.0200
alppha1 0.300 0.3011 0.0019 beta 0.0200
omegaa 0.250 0.2296 0.0009 beta 0.0200
thetaa 0.800 0.8190 0.0011 gamm 0.0200
mua 2.100 2.0838 0.0011 gamm 0.0200
gammad 0.450 0.4290 0.0010 beta 0.0200
alphad 0.300 0.3089 0.0008 beta 0.0200
alppha2 0.250 0.2601 0.0010 beta 0.0200
thetae 0.010 0.0000 0.0012 gamm 0.0200
thetaf 0.800 0.7933 0.0006 gamm 0.0200
upsilonx 3.300 3.3023 0.0006 gamm 0.0200
rhop 0.090 0.0972 0.0008 gamm 0.0200
omega 0.461 0.4703 0.0012 beta 0.0200
rhof 0.800 0.8010 0.0018 beta 0.0200
rhoo 0.907 0.9387 0.0020 beta 0.0500
landapi -0.990 -0.9646 0.0019 norm 0.0500
landay -2.967 -3.0225 0.0033 norm 0.0500
rhonu 0.720 0.7197 0.0020 norm 0.0500
rhowx 0.800 0.8297 0.0016 beta 0.0300
rhoyxp 0.300 0.2833 0.0018 beta 0.0500
rhodc 0.921 0.9067 0.0040 beta 0.0500
rhopo 0.600 0.6173 0.0045 beta 0.0500
rhoeo 0.600 0.6042 0.0017 beta 0.0500
rhoma 0.850 0.8352 0.0014 beta 0.0500
rhomo 0.850 0.7976 0.0041 beta 0.0500
rhogi 0.500 0.5043 0.0020 beta 0.0500
rhoa 0.750 0.7423 0.0023 beta 0.0500
rhope 0.420 0.4465 0.0020 beta 0.0500
rhom 0.270 0.3229 0.0021 beta 0.0500
rhoor 0.277 0.2886 0.0012 beta 0.0500
rhopitarg 0.891 0.8538 0.0031 beta 0.0500
rhog 0.690 0.7625 0.0030 beta 0.0500
phip 0.100 0.1020 0.0009 beta 0.0200
k0 0.900 0.8972 0.0005 beta 0.0200
k1 -1.900 -1.8983 0.0024 norm 0.0200
k2 -1.550 -1.5635 0.0007 norm 0.0200

standard deviation of shocks
prior mean mode s.d. prior pstdev

epsilona 0.010 4.8012 0.3507 invg Inf
epsilono 0.010 0.0054 0.0050 invg Inf
epsilong 0.010 0.0115 0.0047 invg Inf
epsiloni 0.010 0.0085 0.0057 invg Inf
epsilonma 0.010 0.0052 0.0005 invg Inf
epsilonmo 0.010 1.7393 0.1609 invg Inf
epsilonf 0.010 0.9150 0.0925 invg Inf
epsilonwx 0.010 0.0369 0.0042 invg Inf
epsiloneo 0.010 0.0038 0.0050 invg Inf
epsilonpe 0.010 0.0055 0.0066 invg Inf
epsilonnu 0.010 1.4945 0.1035 invg Inf
epsilonor 0.010 0.0035 0.0058 invg Inf
epsilonpitarg 0.010 0.0078 0.1321 invg Inf
epsilondc 0.010 0.6393 0.1710 invg Inf
epsilonex 0.010 3.1791 0.2047 invg Inf


Log data density [Laplace approximation] is -659.332542.

Estimation::mcmc: Multiple chains mode.
Estimation::mcmc: Old mh-files successfully erased!
Estimation::mcmc: Old metropolis.log file successfully erased!
Estimation::mcmc: Creation of a new metropolis.log file.
Estimation::mcmc: Searching for initial values...
Estimation::mcmc: Initial values found!

Estimation::mcmc: Write details about the MCMC... Ok!
Estimation::mcmc: Details about the MCMC are available in dsgetezfinalex2/metropolis\dsgetezfinalex2_mh_history_0.mat


Estimation::mcmc: Number of mh files: 11 per block.
Estimation::mcmc: Total number of generated files: 55.
Estimation::mcmc: Total number of iterations: 20000.
Estimation::mcmc: Current acceptance ratio per chain:
Chain 1: 31.3884%
Chain 2: 35.5932%
Chain 3: 37.8181%
Chain 4: 44.2978%
Chain 5: 39.748%
Estimation::mcmc::diagnostics: Univariate convergence diagnostic, Brooks and Gelman (1998):
Parameter 1... Done!
Parameter 2... Done!
Parameter 3... Done!
Parameter 4... Done!
Parameter 5... Done!
Parameter 6... Done!
Parameter 7... Done!
Parameter 8... Done!
Parameter 9... Done!
Parameter 10... Done!
Parameter 11... Done!
Parameter 12... Done!
Parameter 13... Done!
Parameter 14... Done!
Parameter 15... Done!
Parameter 16... Done!
Parameter 17... Done!
Parameter 18... Done!
Parameter 19... Done!
Parameter 20... Done!
Parameter 21... Done!
Parameter 22... Done!
Parameter 23... Done!
Parameter 24... Done!
Parameter 25... Done!
Parameter 26... Done!
Parameter 27... Done!
Parameter 28... Done!
Parameter 29... Done!
Parameter 30... Done!
Parameter 31... Done!
Parameter 32... Done!
Parameter 33... Done!
Parameter 34... Done!
Parameter 35... Done!
Parameter 36... Done!
Parameter 37... Done!
Parameter 38... Done!
Parameter 39... Done!
Parameter 40... Done!
Parameter 41... Done!
Parameter 42... Done!
Parameter 43... Done!
Parameter 44... Done!
Parameter 45... Done!
Parameter 46... Done!
Parameter 47... Done!
Parameter 48... Done!
Parameter 49... Done!
Parameter 50... Done!
Parameter 51... Done!
Parameter 52... Done!
Parameter 53... Done!
Parameter 54... Done!
Parameter 55... Done!
Parameter 56... Done!
Parameter 57... Done!
Parameter 58... Done!
Parameter 59... Done!
Parameter 60... Done!
Parameter 61... Done!
Parameter 62... Done!
Parameter 63... Done!
Parameter 64... Done!

Estimation::mcmc: Total number of MH draws: 20000.
Estimation::mcmc: Total number of generated MH files: 11.
Estimation::mcmc: I'll use mh-files 6 to 11.
Estimation::mcmc: In MH-file number 6 I'll start at line 530.
Estimation::mcmc: Finally I keep 10000 draws.

Estimation::marginal density: I'm computing the posterior mean and covariance... Done!
Estimation::marginal density: I'm computing the posterior log marginal density (modified harmonic mean)...
Estimation::marginal density: The support of the weighting density function is not large enough...
Estimation::marginal density: I increase the variance of this distribution.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.

Estimation::marginal density: Let me try again.
Estimation::marginal density: There's probably a problem with the modified harmonic mean estimator.


ESTIMATION RESULTS

Log data density is -Inf.
posterior_moments: There are not enough draws computes to compute HPD Intervals. Skipping their computation.
posterior_moments: There are not enough draws computes to compute deciles. Skipping their computation.

parameters
prior mean post. mean 90% HPD interval prior pstdev

betta 0.980 0.9792 0.9786 0.9798 beta 0.0100
b 1.350 1.4134 1.4045 1.4242 gamma 0.0500
sigmac 1.521 1.5427 1.5369 1.5463 gamma 0.0500
eta 0.300 0.2950 0.2941 0.2954 gamma 0.0100
sigmalu 2.920 2.9556 2.9497 2.9618 gamma 0.0500
sigmalr 2.200 2.1919 2.1889 2.1943 gamma 0.0500
etao 1.150 1.1456 1.1440 1.1468 gamma 0.0200
etaa 1.400 1.4076 1.4061 1.4099 gamma 0.0200
nu 2.000 1.9786 1.9754 1.9822 gamma 0.0200
omegao 0.200 0.1910 0.1891 0.1927 beta 0.0200
thetao 4.330 4.3180 4.3155 4.3199 gamma 0.0200
muo 2.600 2.6167 2.6137 2.6193 gamma 0.0200
alphao 0.420 0.4175 0.4152 0.4194 beta 0.0200
iotao 0.280 0.2995 0.2978 0.3016 beta 0.0200
alppha1 0.300 0.3014 0.2997 0.3035 beta 0.0200
omegaa 0.250 0.2303 0.2264 0.2330 beta 0.0200
thetaa 0.800 0.8189 0.8164 0.8210 gamma 0.0200
mua 2.100 2.0839 2.0820 2.0852 gamma 0.0200
gammad 0.450 0.4294 0.4276 0.4311 beta 0.0200
alphad 0.300 0.3088 0.3073 0.3102 beta 0.0200
alppha2 0.250 0.2600 0.2586 0.2615 beta 0.0200
thetae 0.010 0.0002 0.0000 0.0006 gamma 0.0200
thetaf 0.800 0.7942 0.7929 0.7958 gamma 0.0200
upsilonx 3.300 3.3019 3.3009 3.3027 gamma 0.0200
rhop 0.090 0.0968 0.0954 0.0986 gamma 0.0200
omega 0.461 0.4695 0.4679 0.4708 beta 0.0200
rhof 0.800 0.8008 0.7992 0.8023 beta 0.0200
rhoo 0.907 0.9367 0.9317 0.9449 beta 0.0500
landapi -0.990 -0.9659 -0.9699 -0.9616 norm 0.0500
landay -2.967 -3.0228 -3.0320 -3.0164 norm 0.0500
rhonu 0.720 0.7192 0.7174 0.7214 norm 0.0500
rhowx 0.800 0.8284 0.8244 0.8344 beta 0.0300
rhoyxp 0.300 0.2843 0.2791 0.2873 beta 0.0500
rhodc 0.921 0.9097 0.9064 0.9135 beta 0.0500
rhopo 0.600 0.6195 0.6146 0.6235 beta 0.0500
rhoeo 0.600 0.6047 0.6024 0.6085 beta 0.0500
rhoma 0.850 0.8374 0.8347 0.8405 beta 0.0500
rhomo 0.850 0.7961 0.7884 0.8003 beta 0.0500
rhogi 0.500 0.5051 0.5028 0.5081 beta 0.0500
rhoa 0.750 0.7411 0.7373 0.7446 beta 0.0500
rhope 0.420 0.4463 0.4420 0.4498 beta 0.0500
rhom 0.270 0.3226 0.3167 0.3300 beta 0.0500
rhoor 0.277 0.2870 0.2841 0.2897 beta 0.0500
rhopitarg 0.891 0.8555 0.8492 0.8606 beta 0.0500
rhog 0.690 0.7588 0.7523 0.7728 beta 0.0500
phip 0.100 0.1021 0.1005 0.1036 beta 0.0200
k0 0.900 0.8972 0.8962 0.8980 beta 0.0200
k1 -1.900 -1.8973 -1.8997 -1.8944 norm 0.0200
k2 -1.550 -1.5626 -1.5636 -1.5615 norm 0.0200

standard deviation of shocks
prior mean post. mean 90% HPD interval prior pstdev

epsilona 0.010 4.8697 4.2600 5.3738 invg Inf
epsilono 0.010 0.0073 0.0027 0.0122 invg Inf
epsilong 0.010 0.0082 0.0027 0.0147 invg Inf
epsiloni 0.010 0.0069 0.0029 0.0113 invg Inf
epsilonma 0.010 0.0050 0.0039 0.0061 invg Inf
epsilonmo 0.010 1.7823 1.4580 2.1951 invg Inf
epsilonf 0.010 0.9101 0.7221 1.2428 invg Inf
epsilonwx 0.010 0.0381 0.0334 0.0446 invg Inf
epsiloneo 0.010 0.0085 0.0025 0.0144 invg Inf
epsilonpe 0.010 0.0061 0.0028 0.0095 invg Inf
epsilonnu 0.010 1.4881 1.3811 1.6106 invg Inf
epsilonor 0.010 0.0090 0.0021 0.0204 invg Inf
epsilonpitarg 0.010 0.0097 0.0022 0.0182 invg Inf
epsilondc 0.010 0.7052 0.4992 0.9009 invg Inf
epsilonex 0.010 3.1057 2.9226 3.4241 invg Inf
Estimation::mcmc: Posterior (dsge) IRFs...
Estimation::mcmc: Posterior IRFs, done!
Total computing time : 1h24m39s
Note: warning(s) encountered in MATLAB/Octave code

Re: error mcmc

PostPosted: Thu Mar 10, 2016 10:49 am
by jpfeifer
What exactly is your problem? Judging from the initial likelihood, I would say your observation equations are wrong.