wrong computation of lower bounds for priors?

As Dynare 4 is now the main version, this forum is now closed. Please, post
on the Dynare Help forum
Forum rules
As Dynare 4 is the current Dynare version, there forum is now close. Post new question in the Dynare Help Forum.

wrong computation of lower bounds for priors?

Postby lombard » Thu Nov 13, 2008 11:36 am

Hi,

In relation to my previous message to this forum, I've tried to trace the source of the problems.

I've noticed that Dynare computes bounds for priors, even if the user did not want to have bounds (besided the natural bounds imposed by the distributions)

In prior_bounds.m these bounds are computed and in dynare_estimation.m they are set as lower (lb) and upper (ub) bounds (about line 107).

For example the value set to the lower bound is (first numer is just the entry line, second is the lower bound)


[[1:length(lb)]',lb]

ans =

1.0000 0.3568
2.0000 0.0000
3.0000 0.0000
4.0000 0.0000
5.0000 0.0000
6.0000 0.0000
7.0000 0.0000
8.0000 0.0000
9.0000 0.0000
10.0000 0.0037
11.0000 0.7943
12.0000 0.7943
13.0000 0.4087
14.0000 1.5887
15.0000 0.0314
16.0000 0.0314
17.0000 0.0314
18.0000 0.0314
19.0000 0.3934
20.0000 1.0639
21.0000 -0.3361
22.0000 -0.2556
23.0000 0.0040
24.0000 0.0471
25.0000 0.0471
26.0000 0.0471
27.0000 0.0471
28.0000 0.0471
29.0000 0.0471
30.0000 0.0471
31.0000 0.0471
32.0000 0.0471
33.0000 0.0471
34.0000 0.0471
35.0000 0.0301
36.0000 0.0301
37.0000 0.0301
38.0000 0.0301
39.0000 0.0301
40.0000 0.0301
41.0000 0.0301
42.0000 0.0301
43.0000 0.0301
44.0000 0.0301
45.0000 0.0301
46.0000 0.0301
47.0000 0.0001
48.0000 0.9800
49.0000 1.0000
50.0000 0.0471
51.0000 0.1073
52.0000 0.0471
53.0000 0.0471
54.0000 0.0301
55.0000 0.0301
56.0000 0.0301
57.0000 0.0301


Notice though that my priors are (the first figure is added only here for convenience!)


1kappa_1, BETA_PDF , 0.7 , 0.05
2xi_W1 , BETA_PDF, 0.5 , 0.25
3chi_W1, BETA_PDF, 0.5 , 0.25
4xi_H , BETA_PDF, 0.5 , 0.25
5chi_H , BETA_PDF, 0.5 , 0.25
6xi_X , BETA_PDF, 0.5 , 0.25
7chi_X , BETA_PDF, 0.5 , 0.25
8xi_IM, BETA_PDF, 0.5 , 0.25
9chi_IM, BETA_PDF, 0.5 , 0.25
10omegastar, BETA_PDF , 0.15 , 0.05
11mu_C , GAMMA_PDF , 2 , 0.25
12mu_I , GAMMA_PDF , 2 , 0.25
13mu_ast , GAMMA_PDF , 1.5 , 0.25
14gamma_I, GAMMA_PDF , 4 , 0.5
15gamma_IMC, GAMMA_PDF , 2.5 , 1
16gamma_IMI, GAMMA_PDF , 2.5 , 1
17gamma_ast, GAMMA_PDF , 2.5 , 1
18gamma_IH1, GAMMA_PDF , 2.5 , 1
19lambda_R, BETA_PDF , 0.9 , 0.05
20lambda_pii, NORMAL_PDF , 1.7 , 0.1
21lambda_dpii, NORMAL_PDF , 0.3 , 0.1
22lambda_dgdp, NORMAL_PDF , 0.0625 , 0.05
23xiE , BETA_PDF , 0.5 , 0.15
24rho_RP_dom, BETA_PDF , 0.5 , 0.1
25rho_RP, BETA_PDF , 0.5 , 0.1
26rho_Gc, BETA_PDF , 0.5 , 0.1
27rho_prod, BETA_PDF , 0.5 , 0.1
28rho_I, BETA_PDF , 0.5 , 0.1
29rho_w1, BETA_PDF , 0.5 , 0.1
30rho_varphi_H, BETA_PDF , 0.5 , 0.1
31rho_varphi_X, BETA_PDF , 0.5 , 0.1
32rho_varphi_IM, BETA_PDF , 0.5 , 0.1
33rho_IM, BETA_PDF , 0.5 , 0.1
34rho_nu_ast, BETA_PDF , 0.5 , 0.1
35std_RP_dom, INV_GAMMA_PDF , 0.169256875 , 0.12787537
36std_RP, INV_GAMMA_PDF , 0.169256875 , 0.12787537
37std_Gc, INV_GAMMA_PDF , 0.169256875 , 0.12787537
38std_prod, INV_GAMMA_PDF , 0.169256875 , 0.12787537
39std_I , INV_GAMMA_PDF , 0.169256875 , 0.12787537
40std_w1, INV_GAMMA_PDF , 0.169256875 , 0.12787537
41std_varphi_H, INV_GAMMA_PDF , 0.169256875 , 0.12787537
42std_varphi_X, INV_GAMMA_PDF , 0.169256875 , 0.12787537
43std_varphi_IM, INV_GAMMA_PDF , 0.169256875 , 0.12787537
44std_IM, INV_GAMMA_PDF , 0.169256875 , 0.12787537
45std_nu_ast, INV_GAMMA_PDF , 0.169256875 , 0.12787537
46std_policy, INV_GAMMA_PDF , 0.169256875 , 0.12787537
47chi_2, BETA_PDF , 0.1 , 0.05
48Gqh, UNIFORM_PDF, , , .98,1.001
49Gc, UNIFORM_PDF, , , 1,1.01
50rho_gamma, BETA_PDF , 0.50, 0.1
51rho_Gqh, BETA_PDF , 0.75, 0.1
52rho_m_B, BETA_PDF , 0.5 , 0.1
53rho_chi, BETA_PDF , 0.5 , 0.1
54std_Gqh, INV_GAMMA_PDF , 0.169256875 , 0.12787537
55std_m_B, INV_GAMMA_PDF , 0.169256875 , 0.12787537
56std_chi, INV_GAMMA_PDF , 0.169256875 , 0.12787537
57std_gamma, INV_GAMMA_PDF , 0.169256875 , 0.12787537


The fact that some prameters' initial values are below lb causes the crash of Dynare (in DsgeLikelihood.m)

Code: Select all
  if options_.mode_compute ~= 1 & any(xparam1 < bayestopt_.lb)
    k = find(xparam1 < bayestopt_.lb);
    fval = bayestopt_.penalty+sum((bayestopt_.lb(k)-xparam1(k)).^2);
    cost_flag = 0;
    info = 41;
    return;
  end


To me all this is a bit obscure. It would be nice to have a warning saying that Dynare is taking over the choice of bounds indicating (in the piece of code above) which option should be changed to avoid this problem. (Notice for example that the interest rate inertia parameter lambda_R has a lower bound of 0.3934!!!)

Best

Gianni
lombard
 
Posts: 132
Joined: Wed Feb 02, 2005 12:36 pm
Location: Basel

Return to Dynare version 4

Who is online

Users browsing this forum: No registered users and 2 guests