# Lower bound and prior_3rd_parameter

Dear all,

Could anyone help to explain the difference between lower bound and prior_3rd_parameter in Beyasian estimation?

Huanhuan

Lower bound only restricts the parameter during mode-finding. When doing so, it truncates the original distribution. Say you have a normal distribution with mean 0 and variance 1. If you set the lower bound to -1, the standard normal distribution will be truncated to -1, Infinity). If you would use this in Bayesian estimation, the prior would not integrate to 1, which is the reason, the lower bound is ignored during Bayesian estimation and only active during mode-finding.
prior_3rd_parameter in contrast is used to specify generalized distributions. Take the beta distribution. Its support is always [0,1]. prior_3rd_parameter allows moving the lower bound of the support. Say you set prior_3rd_parameter to -1. In this case, the original beta distribution will be stretched and shifted to the support -1,1]. The prior will still integrate to 1.

Dear Johannes Pfeifer,

Best regards,
Huan

[quote=“jpfeifer”]Lower bound only restricts the parameter during mode-finding. When doing so, it truncates the original distribution. Say you have a normal distribution with mean 0 and variance 1. If you set the lower bound to -1, the standard normal distribution will be truncated to -1, Infinity). If you would use this in Bayesian estimation, the prior would not integrate to 1, which is the reason, the lower bound is ignored during Bayesian estimation and only active during mode-finding.
prior_3rd_parameter in contrast is used to specify generalized distributions. Take the beta distribution. Its support is always [0,1]. prior_3rd_parameter allows moving the lower bound of the support. Say you set prior_3rd_parameter to -1. In this case, the original beta distribution will be stretched and shifted to the support -1,1]. The prior will still integrate to 1.[/quote]

Dear Johannes,
If I estimate a parameter “alpha”, and only when 0.6<alpha<0.9 , the model is determinate. Otherwise it is indeterminacy.
1.Should I use following code to restrict alpha in the determinate region?

2.If I set prior to cover both indeterminacy and determinacy region, (my code is for determinacy model), like:

Then does dynare never pick a draw from indeterminacy region [0.9, 1]?Will the prior still integrate to 1?

Kindest regards,
Huan

Dear Huan,

if you know your parameter is bounded, you should use a prior that restricts it to that range. Using a gamma prior is not advocated because the upper bound is infinity. There is no generalized gamma distribution, so specifying ab upper bound is futile. If you do this as in 1), Dynare will truncate the gamma distribution for mode-finding, but will not use a proper truncated gamma distribution (i.e. will not redistribute the truncated mass). Because of this, your prior will not integrate to 1. Note that this is no problem for estimation, but for model_comparison as the marginal data densities will be wrong.

[quote=“jpfeifer”]Dear Huan,

if you know your parameter is bounded, you should use a prior that restricts it to that range. Using a gamma prior is not advocated because the upper bound is infinity. There is no generalized gamma distribution, so specifying ab upper bound is futile. If you do this as in 1), Dynare will truncate the gamma distribution for mode-finding, but will not use a proper truncated gamma distribution (i.e. will not redistribute the truncated mass). Because of this, your prior will not integrate to 1. Note that this is no problem for estimation, but for model_comparison as the marginal data densities will be wrong.[/quote]

Q1 : If I understand correctly, even if I set not only lower/uppe bound but also the 3rd and 4th parameter to be 0.6 and 0.9 respectively, the support of the gamma distribution only becomes [0.6, infinity) instead of [0.6,0.9]? (this is unlike beta distribution, since both the upper & lower bound of the support of beta distribution can be changed).

Q2: “Prior integrates to 1” is a sufficent and necessary condition for model comparison(while data is same)?

Q3: In my example 1), if I use beta distribution instead of gamma distribution, like `alpha, ,0.6,0.9,beta_pdf,0.8,0.05,0.6,0.9;`,would the prior
integrate to 1?

Q3: If not, could you please give me some advice how I should set the prior to restict it to a range,like[0.5, 1.5] , and at the same time marginal data densities are computed correctly so that I can make model comparison?

So many questions…Thank you in advance!

Best regards,
Huan

Q1: yes, because there is no generalized gamma distribution with an upper bound
Q2: it is necessary, but clearly not sufficient. There are a bunch of regularity conditions involved that need to hold
Q3: yes, that should be correct

Dear Johannes,

Could I ask more questions on this topic?

1. As far as I know, 3rd/4th parameters specification should not influence mode-finding results, however, the following 2 priors get completely different mode results (initial value 1.3 , mean1.366, std0.2).

Why does this happen?

1. For some reason, I have to use matlab code instead of dynare to estimate model. The key parameter "miu " should be always >1.
If I truncate like this

```pd=makedist('Gamma','a',1.366^2/0.2^2,'b',0.2^2/1.366); t=truncate(pd,1,inf); P1=pdf(t,Theta(1));```

would that be correct? It corresponds to truncation of upper and lower bound?

1. If I still confused to set truncated gamma pdf(>1) in matlab code, how about using this way:
I set another parameter** “alpha=miu-1” **so that when miu>1 , alpha>0. Then I estimate alpha instead of miu using gamma distribution prior without truncation? Does that make sense?

Many many many thanks in advance!
Kind regards,
Huan

I can only provide Dynare advice here as I am not working with this type of Matlab implementation.

1. By specifying the 3rd/4th parameters you are setting generalized distributions. Why do you think this should not affect results? Consider a beta distribution. In this case, the mode by construction must be between 0 and 1. Now consider a generalized beta distribution with 3rd/4th parameters 1 and 2. Now the beta distribution will be over the support [1,2] and the mode must be within this interval.

[quote=“jpfeifer”]I can only provide Dynare advice here as I am not working with this type of Matlab implementation.

1. By specifying the 3rd/4th parameters you are setting generalized distributions. Why do you think this should not affect results? Consider a beta distribution. In this case, the mode by construction must be between 0 and 1. Now consider a generalized beta distribution with 3rd/4th parameters 1 and 2. Now the beta distribution will be over the support [1,2] and the mode must be within this interval.[/quote]

Could I further ask if I need estimate a parameter u which is always >1, but I do not like truncate the prior , so I set `alpha=u-1` ,which is >0. And estimate **alpha ** with not truncated gamma pdf prior. Then use the posterior mean of alpha plus 1 to derive the value of u. Does that make sense?